aws.cloudwatchlogs-subscription-filter resource¶
Description¶
SubscriptionFilter sends events from one CloudWatch Logs log group to a Lambda function, Kinesis stream, Firehose stream, or Logs destination. The log group, filter name, and destination are fixed once the filter is made; the pattern, distribution, system fields, role, and transformed-log flag are reconciled in place by PutSubscriptionFilter.
Source: internal/service/cloudwatchlogs/subscription_filter_rsrc.go:42
Example usage:
imports: {
aws: 'github.com/cloudboss/unobin-library-aws'
}
resources: {
example: aws.cloudwatchlogs-subscription-filter {
# Set input fields here.
}
}
Inputs¶
destination-arn
string
log-group-name
string
name
string
filter-pattern
string
distribution
string
ByLogStream
emit-system-fields
list(string)
field-selection-criteria
optional(string)
role-arn
optional(string)
apply-on-transformed-logs
optional(boolean)
Input Constraints¶
Distribution rules
distribution must be ByLogStream or Random.
Rule logic
- When
input.distribution != null- Require
input.distribution == 'ByLogStream'
|| input.distribution == 'Random'
Emit system fields rules
emit-system-fields entries must be @aws.account or @aws.region.
Rule logic
- For each
input.emit-system-fields- Require
@each.value == '@aws.account'
|| @each.value == '@aws.region'
Outputs¶
log-group-name
string
name
string
apply-on-transformed-logs
boolean
role-arn
optional(string)