Group

class Group : KotlinCustomResource

Provides a Resource Group.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.resourcegroups.Group("test", {
name: "test-group",
resourceQuery: {
query: `{
"ResourceTypeFilters": [
"AWS::EC2::Instance"
],
"TagFilters": [
{
"Key": "Stage",
"Values": ["Test"]
}
]
}
`,
},
});
import pulumi
import pulumi_aws as aws
test = aws.resourcegroups.Group("test",
name="test-group",
resource_query={
"query": """{
"ResourceTypeFilters": [
"AWS::EC2::Instance"
],
"TagFilters": [
{
"Key": "Stage",
"Values": ["Test"]
}
]
}
""",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = new Aws.ResourceGroups.Group("test", new()
{
Name = "test-group",
ResourceQuery = new Aws.ResourceGroups.Inputs.GroupResourceQueryArgs
{
Query = @"{
""ResourceTypeFilters"": [
""AWS::EC2::Instance""
],
""TagFilters"": [
{
""Key"": ""Stage"",
""Values"": [""Test""]
}
]
}
",
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/resourcegroups"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := resourcegroups.NewGroup(ctx, "test", &resourcegroups.GroupArgs{
Name: pulumi.String("test-group"),
ResourceQuery: &resourcegroups.GroupResourceQueryArgs{
Query: pulumi.String(`{
"ResourceTypeFilters": [
"AWS::EC2::Instance"
],
"TagFilters": [
{
"Key": "Stage",
"Values": ["Test"]
}
]
}
`),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.resourcegroups.Group;
import com.pulumi.aws.resourcegroups.GroupArgs;
import com.pulumi.aws.resourcegroups.inputs.GroupResourceQueryArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var test = new Group("test", GroupArgs.builder()
.name("test-group")
.resourceQuery(GroupResourceQueryArgs.builder()
.query("""
{
"ResourceTypeFilters": [
"AWS::EC2::Instance"
],
"TagFilters": [
{
"Key": "Stage",
"Values": ["Test"]
}
]
}
""")
.build())
.build());
}
}
resources:
test:
type: aws:resourcegroups:Group
properties:
name: test-group
resourceQuery:
query: |
{
"ResourceTypeFilters": [
"AWS::EC2::Instance"
],
"TagFilters": [
{
"Key": "Stage",
"Values": ["Test"]
}
]
}

Import

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

$ pulumi import aws:resourcegroups/group:Group foo resource-group-name

Properties

Link copied to clipboard
val arn: Output<String>

The ARN assigned by AWS for this resource group.

Link copied to clipboard

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.

Link copied to clipboard
val description: Output<String>?

A description of the resource group.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

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 with AWS or aws.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A resource_query block. Resource queries are documented below.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>