Resource
aws.logs.LogGroup
Represents a log group.
kms_key_id uses KmsKeyReference and accepts key ARNs only. Key ARNs need no lookup. See KMS reference planning permissions.
Example
aws.logs.LogGroup {
log_group_name = 'carina-example-log-group'
log_group_class = aws.logs.LogGroup.LogGroupClass.standard
retention_in_days = 7
tags = {
Environment = 'example'
}
}
Argument Reference
deletion_protection_enabled
- Type:
Bool - Required: No
Use this parameter to enable deletion protection for the new log group. When enabled on a log group, deletion protection blocks all deletion operations until it is explicitly disabled. By default log groups are created without deletion protection enabled.
kms_key_id
- Type:
KmsKeyReference (pattern: /^((arn:(?:aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b|aws-iso-e|aws-iso-f|aws-eusc):kms:[a-z]{2,4}(-[a-z0-9]+)+-[0-9]+:[0-9]{12}:(key/([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|mrk-[0-9a-fA-F]{32})|alias/[a-zA-Z0-9:/_-]+))|(alias/[a-zA-Z0-9:/_-]+)|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})|(mrk-[0-9a-fA-F]{32}))$/ (Full), len: 1..=2048) - Required: No
The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. For more information, see Amazon Resource Names.
log_group_class
- Type: LogGroupClass
- Required: No
Use this parameter to specify the log group class for this log group. There are four classes: The Standard log class supports all CloudWatch Logs features. The Infrequent Access log class supports a subset of CloudWatch Logs features and incurs lower costs. The Essentials log class supports a subset of CloudWatch Logs features and incurs lower costs. Use the Delivery log class only for delivering Lambda logs to store in Amazon S3 or Amazon Data Firehose. Log events in log groups in the Delivery class are kept in CloudWatch Logs for only one day. This log class doesn't offer rich CloudWatch Logs capabilities such as CloudWatch Logs Insights queries. If you omit this parameter, the default of STANDARD is used. The value of logGroupClass can't be changed after a log group is created. For details about the features supported by each class, see Log classes
log_group_name
- Type:
String (pattern: /^[\.\-_/#A-Za-z0-9]+$/ (Full), len: 1..=512) - Required: Yes
A name for the log group.
retention_in_days
- Type:
LogsLogGroupRetentionInDays (member constraints: range: -2147483648..=2147483647, custom validator); allowed: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1096, 1827, 2192, 2557, 2922, 3288, 3653 - Required: No
The number of days to retain the log events in the log group. If unset, events never expire. The provider applies changes via PutRetentionPolicy / DeleteRetentionPolicy.
tags
- Type: Map<
String (pattern: /^([\p{L}\p{Z}\p{N}_.:/=+\-@]+)$/ (Full), len: 1..=128),String (pattern: /^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$/ (Full), len: 0..=256)> (entries: 1..=50) - Required: No
The tags for the resource.
Enum Values
log_group_class (LogGroupClass)
| Value | DSL Identifier |
|---|---|
DELIVERY |
aws.logs.LogGroup.LogGroupClass.delivery |
ESSENTIALS |
aws.logs.LogGroup.LogGroupClass.essentials |
INFREQUENT_ACCESS |
aws.logs.LogGroup.LogGroupClass.infrequent_access |
STANDARD |
aws.logs.LogGroup.LogGroupClass.standard |
Shorthand formats: delivery or LogGroupClass.delivery
Additional Input Constraints
| Attribute | Applies on | Additional constraint |
|---|---|---|
kms_key_id |
Create only | String (len: 0..=256) |
kms_key_id |
Create only | String (pattern: /^arn:(?:aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b|aws-iso-e|aws-iso-f|aws-eusc):kms:[a-z]{2,4}(-[a-z0-9]+)+-[0-9]+:[0-9]{12}:key/([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|mrk-[0-9a-fA-F]{32})$/ (Full)) |