Carina

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

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

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

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

A name for the log group.

retention_in_days

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

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))