Resource: aws_resourcegroups_group

Provides a Resource Group.

Example Usage

resource "aws_resourcegroups_group" "test" {
  name = "test-group"

  resource_query {
    query = <<JSON
{
  "ResourceTypeFilters": [
    "AWS::EC2::Instance"
  ],
  "TagFilters": [
    {
      "Key": "Stage",
      "Values": ["Test"]
    }
  ]
}
JSON
  }
}

Argument Reference

This resource supports the following arguments:

The resource_query block supports the following arguments:

The configuration block supports the following arguments:

The parameters block supports the following arguments:

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 resource groups using the name. For example:

import {
  to = aws_resourcegroups_group.foo
  id = "resource-group-name"
}

Using terraform import, import resource groups using the name. For example:

% terraform import aws_resourcegroups_group.foo resource-group-name