Files
opentf/website/source/docs/providers/aws/r/cloudwatch_log_group.html.markdown
stack72 188350458c provider/aws: Add Support for Tags to aws_cloudwatch_log_group
``````
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCloudWatchLogGroup_'                               2 ↵ ✭
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/12 16:22:07 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSCloudWatchLogGroup_ -timeout 120m
=== RUN   TestAccAWSCloudWatchLogGroup_importBasic
--- PASS: TestAccAWSCloudWatchLogGroup_importBasic (44.20s)
=== RUN   TestAccAWSCloudWatchLogGroup_basic
--- PASS: TestAccAWSCloudWatchLogGroup_basic (38.08s)
=== RUN   TestAccAWSCloudWatchLogGroup_retentionPolicy
--- PASS: TestAccAWSCloudWatchLogGroup_retentionPolicy (55.85s)
=== RUN   TestAccAWSCloudWatchLogGroup_multiple
--- PASS: TestAccAWSCloudWatchLogGroup_multiple (20.68s)
=== RUN   TestAccAWSCloudWatchLogGroup_disappears
--- PASS: TestAccAWSCloudWatchLogGroup_disappears (21.48s)
=== RUN   TestAccAWSCloudWatchLogGroup_tagging
--- PASS: TestAccAWSCloudWatchLogGroup_tagging (39.09s)
ok
PASS	github.com/hashicorp/terraform/builtin/providers/aws	219.411s
```
2017-01-12 16:39:12 +02:00

1001 B

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
aws AWS: aws_cloudwatch_log_group docs-aws-resource-cloudwatch-log-group Provides a CloudWatch Log Group resource.

aws_cloudwatch_log_group

Provides a CloudWatch Log Group resource.

Example Usage

resource "aws_cloudwatch_log_group" "yada" {
  name = "Yada"

  tags {
    Environment = "production"
    Application = "serviceA"
  }
}

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the log group
  • retention_in_days - (Optional) Specifies the number of days you want to retain log events in the specified log group.
  • tags - (Optional) A mapping of tags to assign to the resource.

Attributes Reference

The following attributes are exported:

  • arn - The Amazon Resource Name (ARN) specifying the log group.

Import

Cloudwatch Log Groups can be imported using the name, e.g.

$ terraform import aws_cloudwatch_log_group.test_group yada