Resource: aws_devopsguru_resource_collection

Terraform resource for managing an AWS DevOps Guru Resource Collection.

Example Usage

All Account Resources

resource "aws_devopsguru_resource_collection" "example" {
  type = "AWS_SERVICE"
  cloudformation {
    stack_names = ["*"]
  }
}

CloudFormation Stacks

resource "aws_devopsguru_resource_collection" "example" {
  type = "AWS_CLOUD_FORMATION"
  cloudformation {
    stack_names = ["ExampleStack"]
  }
}

Tags

resource "aws_devopsguru_resource_collection" "example" {
  type = "AWS_TAGS"
  tags {
    app_boundary_key = "DevOps-Guru-Example"
    tag_values       = ["Example-Value"]
  }
}

Tags All Resources

To analyze all resources with the app_boundary_key regardless of the corresponding tag value, set tag_values to ["*"].

resource "aws_devopsguru_resource_collection" "example" {
  type = "AWS_TAGS"
  tags {
    app_boundary_key = "DevOps-Guru-Example"
    tag_values       = ["*"]
  }
}

Argument Reference

The following arguments are required:

The following arguments are optional:

cloudformation Argument Reference

tags Argument Reference

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import DevOps Guru Resource Collection using the id. For example:

import {
  to = aws_devopsguru_resource_collection.example
  id = "AWS_CLOUD_FORMATION"
}

Using terraform import, import DevOps Guru Resource Collection using the id. For example:

% terraform import aws_devopsguru_resource_collection.example AWS_CLOUD_FORMATION