W3cubDocs

/Terraform

aws_cloudwatch_log_destination

Provides a CloudWatch Logs destination resource.

Example Usage

resource "aws_cloudwatch_log_destination" "test_destination" {
  name       = "test_destination"
  role_arn   = "${aws_iam_role.iam_for_cloudwatch.arn}"
  target_arn = "${aws_kinesis_stream.kinesis_for_cloudwatch.arn}"
}

Argument Reference

The following arguments are supported:

  • name - (Required) A name for the log destination
  • role_arn - (Required) The ARN of an IAM role that grants Amazon CloudWatch Logs permissions to put data into the target
  • target_arn - (Required) The ARN of the target Amazon Kinesis stream or Amazon Lambda resource for the destination

Attributes Reference

In addition to all arguments above, the following attributes are exported:

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

Import

CloudWatch Logs destinations can be imported using the name, e.g.

$ terraform import aws_cloudwatch_log_destination.test_destination test_destination

© 2018 HashiCorpLicensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/aws/r/cloudwatch_log_destination.html