Resource: awsResourcegroupsGroup
Provides a Resource Group.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.resourcegroupsGroup.ResourcegroupsGroup(this, "test", {
name: "test-group",
resourceQuery: {
query:
'{\n "ResourceTypeFilters": [\n "AWS::EC2::Instance"\n ],\n "TagFilters": [\n {\n "Key": "Stage",\n "Values": ["Test"]\n }\n ]\n}\n',
},
});
Argument Reference
The following arguments are supported:
name
- (Required) The resource group's name. A resource group name can have a maximum of 127 characters, including letters, numbers, hyphens, dots, and underscores. The name cannot start withaws
oraws
.configuration
- (Optional) A configuration associates the resource group with an AWS service and specifies how the service can interact with the resources in the group. See below for details.description
- (Optional) A description of the resource group.resourceQuery
- (Required) AresourceQuery
block. Resource queries are documented below.tags
- (Optional) Key-value map of resource tags. If configured with a providerdefaultTags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
The resourceQuery
block supports the following arguments:
query
- (Required) The resource query as a JSON string.type
- (Required) The type of the resource query. Defaults toTAG_FILTERS_1_0
.
The configuration
block supports the following arguments:
type
- (Required) Specifies the type of group configuration item.parameters
- (Optional) A collection of parameters for this group configuration item. See below for details.
The parameters
block supports the following arguments:
name
- (Required) The name of the group configuration parameter.values
- (Optional) The value or values to be used for the specified parameter.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
arn
- The ARN assigned by AWS for this resource group.tagsAll
- A map of tags assigned to the resource, including those inherited from the providerdefaultTags
configuration block.
Import
Resource groups can be imported using the name
, e.g.,