---
layout: "aws"
page_title: "AWS: aws_cloudwatch_log_group"
sidebar_current: "docs-aws-resource-cloudwatch-log-group"
description: |-
  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"
}
```

## 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.

## 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
```
---
layout: "aws"
page_title: "AWS: aws_cloudwatch_log_group"
sidebar_current: "docs-aws-resource-cloudwatch-log-group"
description: |-
  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
```
Add Support for Tags to aws_cloudwatch_log_group
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
```
