41 lines
1.5 KiB
Markdown
41 lines
1.5 KiB
Markdown
# Fleet CloudWatch Log Group Sharing (Source Account)
|
|
|
|
## Usage
|
|
|
|
Use this module in the source Fleet account (and in the same region as the Fleet CloudWatch log group).
|
|
|
|
### Firehose destination (default)
|
|
|
|
```hcl
|
|
module "fleet_log_sharing" {
|
|
source = "github.com/fleetdm/fleet-terraform//addons/byo-cloudwatch-log-sharing/cloudwatch?depth=1&ref=tf-mod-addon-byo-cloudwatch-log-sharing-v1.0.0"
|
|
|
|
subscription = {
|
|
log_group_name = module.fleet.byo-vpc.byo-db.byo-ecs.logging_config["awslogs-group"]
|
|
destination_arn = "arn:aws:logs:us-east-2:222222222222:destination:fleet-app-logs-firehose"
|
|
# destination_type defaults to "firehose"
|
|
filter_pattern = ""
|
|
}
|
|
}
|
|
```
|
|
|
|
### Kinesis destination
|
|
|
|
```hcl
|
|
module "fleet_log_sharing" {
|
|
source = "github.com/fleetdm/fleet-terraform//addons/byo-cloudwatch-log-sharing/cloudwatch?depth=1&ref=tf-mod-addon-byo-cloudwatch-log-sharing-v1.0.0"
|
|
|
|
subscription = {
|
|
log_group_name = module.fleet.byo-vpc.byo-db.byo-ecs.logging_config["awslogs-group"]
|
|
destination_arn = "arn:aws:logs:us-east-2:222222222222:destination:fleet-app-logs-kinesis"
|
|
destination_type = "kinesis"
|
|
kinesis_distribution = "ByLogStream"
|
|
filter_pattern = ""
|
|
}
|
|
}
|
|
```
|
|
|
|
`subscription.destination_arn` is usually provided out-of-band by the organization that runs the target-account module in their environment.
|
|
|
|
No Fleet environment variable changes are required. This module configures the CloudWatch Logs subscription directly on the Fleet log group.
|