» aws_cloudwatch_dashboard

Provides a CloudWatch Dashboard resource.

» Example Usage

resource "aws_cloudwatch_dashboard" "main" {
  dashboard_name = "my-dashboard"

  dashboard_body = <<EOF
   "widgets": [
             "title":"EC2 Instance CPU"
             "markdown":"Hello world"

» Argument Reference

The following arguments are supported:

  • dashboard_name - (Required) The name of the dashboard.
  • dashboard_body - (Required) The detailed information about the dashboard, including what widgets are included and their location on the dashboard. You can read more about the body structure in the documentation.

» Attribute Reference

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

  • dashboard_arn - The Amazon Resource Name (ARN) of the dashboard.

» Import

CloudWatch dashboards can be imported using the dashboard_name, e.g.

$ terraform import aws_cloudwatch_dashboard.sample <dashboard_name>