1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. migrationcenter
  5. Group
Google Cloud v8.26.0 published on Thursday, Apr 10, 2025 by Pulumi

gcp.migrationcenter.Group

Explore with Pulumi AI

A resource that represents an asset group. The purpose of an asset group is to bundle a set of assets that have something in common, while allowing users to add annotations to the group.

Example Usage

Migration Group Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.migrationcenter.Group("default", {
    location: "us-central1",
    groupId: "group-test",
    description: "Terraform integration test description",
    displayName: "Terraform integration test display",
    labels: {
        key: "value",
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

default = gcp.migrationcenter.Group("default",
    location="us-central1",
    group_id="group-test",
    description="Terraform integration test description",
    display_name="Terraform integration test display",
    labels={
        "key": "value",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/migrationcenter"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := migrationcenter.NewGroup(ctx, "default", &migrationcenter.GroupArgs{
			Location:    pulumi.String("us-central1"),
			GroupId:     pulumi.String("group-test"),
			Description: pulumi.String("Terraform integration test description"),
			DisplayName: pulumi.String("Terraform integration test display"),
			Labels: pulumi.StringMap{
				"key": pulumi.String("value"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var @default = new Gcp.MigrationCenter.Group("default", new()
    {
        Location = "us-central1",
        GroupId = "group-test",
        Description = "Terraform integration test description",
        DisplayName = "Terraform integration test display",
        Labels = 
        {
            { "key", "value" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.migrationcenter.Group;
import com.pulumi.gcp.migrationcenter.GroupArgs;
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 default_ = new Group("default", GroupArgs.builder()
            .location("us-central1")
            .groupId("group-test")
            .description("Terraform integration test description")
            .displayName("Terraform integration test display")
            .labels(Map.of("key", "value"))
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:migrationcenter:Group
    properties:
      location: us-central1
      groupId: group-test
      description: Terraform integration test description
      displayName: Terraform integration test display
      labels:
        key: value
Copy

Create Group Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Group(name: string, args: GroupArgs, opts?: CustomResourceOptions);
@overload
def Group(resource_name: str,
          args: GroupArgs,
          opts: Optional[ResourceOptions] = None)

@overload
def Group(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          group_id: Optional[str] = None,
          location: Optional[str] = None,
          description: Optional[str] = None,
          display_name: Optional[str] = None,
          labels: Optional[Mapping[str, str]] = None,
          project: Optional[str] = None)
func NewGroup(ctx *Context, name string, args GroupArgs, opts ...ResourceOption) (*Group, error)
public Group(string name, GroupArgs args, CustomResourceOptions? opts = null)
public Group(String name, GroupArgs args)
public Group(String name, GroupArgs args, CustomResourceOptions options)
type: gcp:migrationcenter:Group
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. GroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. GroupArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. GroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. GroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. GroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var gcpGroupResource = new Gcp.MigrationCenter.Group("gcpGroupResource", new()
{
    GroupId = "string",
    Location = "string",
    Description = "string",
    DisplayName = "string",
    Labels = 
    {
        { "string", "string" },
    },
    Project = "string",
});
Copy
example, err := migrationcenter.NewGroup(ctx, "gcpGroupResource", &migrationcenter.GroupArgs{
	GroupId:     pulumi.String("string"),
	Location:    pulumi.String("string"),
	Description: pulumi.String("string"),
	DisplayName: pulumi.String("string"),
	Labels: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Project: pulumi.String("string"),
})
Copy
var gcpGroupResource = new Group("gcpGroupResource", GroupArgs.builder()
    .groupId("string")
    .location("string")
    .description("string")
    .displayName("string")
    .labels(Map.of("string", "string"))
    .project("string")
    .build());
Copy
gcp_group_resource = gcp.migrationcenter.Group("gcpGroupResource",
    group_id="string",
    location="string",
    description="string",
    display_name="string",
    labels={
        "string": "string",
    },
    project="string")
Copy
const gcpGroupResource = new gcp.migrationcenter.Group("gcpGroupResource", {
    groupId: "string",
    location: "string",
    description: "string",
    displayName: "string",
    labels: {
        string: "string",
    },
    project: "string",
});
Copy
type: gcp:migrationcenter:Group
properties:
    description: string
    displayName: string
    groupId: string
    labels:
        string: string
    location: string
    project: string
Copy

Group Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Group resource accepts the following input properties:

GroupId
This property is required.
Changes to this property will trigger replacement.
string
Required. User specified ID for the group. It will become the last component of the group name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: a-z?.


Location
This property is required.
Changes to this property will trigger replacement.
string
The location of the group.
Description string
Optional. The description of the group.
DisplayName string
Optional. User-friendly display name.
Labels Dictionary<string, string>
Labels as key value pairs. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
GroupId
This property is required.
Changes to this property will trigger replacement.
string
Required. User specified ID for the group. It will become the last component of the group name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: a-z?.


Location
This property is required.
Changes to this property will trigger replacement.
string
The location of the group.
Description string
Optional. The description of the group.
DisplayName string
Optional. User-friendly display name.
Labels map[string]string
Labels as key value pairs. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
groupId
This property is required.
Changes to this property will trigger replacement.
String
Required. User specified ID for the group. It will become the last component of the group name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: a-z?.


location
This property is required.
Changes to this property will trigger replacement.
String
The location of the group.
description String
Optional. The description of the group.
displayName String
Optional. User-friendly display name.
labels Map<String,String>
Labels as key value pairs. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
groupId
This property is required.
Changes to this property will trigger replacement.
string
Required. User specified ID for the group. It will become the last component of the group name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: a-z?.


location
This property is required.
Changes to this property will trigger replacement.
string
The location of the group.
description string
Optional. The description of the group.
displayName string
Optional. User-friendly display name.
labels {[key: string]: string}
Labels as key value pairs. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
group_id
This property is required.
Changes to this property will trigger replacement.
str
Required. User specified ID for the group. It will become the last component of the group name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: a-z?.


location
This property is required.
Changes to this property will trigger replacement.
str
The location of the group.
description str
Optional. The description of the group.
display_name str
Optional. User-friendly display name.
labels Mapping[str, str]
Labels as key value pairs. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
groupId
This property is required.
Changes to this property will trigger replacement.
String
Required. User specified ID for the group. It will become the last component of the group name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: a-z?.


location
This property is required.
Changes to this property will trigger replacement.
String
The location of the group.
description String
Optional. The description of the group.
displayName String
Optional. User-friendly display name.
labels Map<String>
Labels as key value pairs. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Outputs

All input properties are implicitly available as output properties. Additionally, the Group resource produces the following output properties:

CreateTime string
Output only. The timestamp when the group was created.
EffectiveLabels Dictionary<string, string>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Output only. The name of the group.
PulumiLabels Dictionary<string, string>
The combination of labels configured directly on the resource and default labels configured on the provider.
UpdateTime string
Output only. The timestamp when the group was last updated.
CreateTime string
Output only. The timestamp when the group was created.
EffectiveLabels map[string]string
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Output only. The name of the group.
PulumiLabels map[string]string
The combination of labels configured directly on the resource and default labels configured on the provider.
UpdateTime string
Output only. The timestamp when the group was last updated.
createTime String
Output only. The timestamp when the group was created.
effectiveLabels Map<String,String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
id String
The provider-assigned unique ID for this managed resource.
name String
Output only. The name of the group.
pulumiLabels Map<String,String>
The combination of labels configured directly on the resource and default labels configured on the provider.
updateTime String
Output only. The timestamp when the group was last updated.
createTime string
Output only. The timestamp when the group was created.
effectiveLabels {[key: string]: string}
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
id string
The provider-assigned unique ID for this managed resource.
name string
Output only. The name of the group.
pulumiLabels {[key: string]: string}
The combination of labels configured directly on the resource and default labels configured on the provider.
updateTime string
Output only. The timestamp when the group was last updated.
create_time str
Output only. The timestamp when the group was created.
effective_labels Mapping[str, str]
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
id str
The provider-assigned unique ID for this managed resource.
name str
Output only. The name of the group.
pulumi_labels Mapping[str, str]
The combination of labels configured directly on the resource and default labels configured on the provider.
update_time str
Output only. The timestamp when the group was last updated.
createTime String
Output only. The timestamp when the group was created.
effectiveLabels Map<String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
id String
The provider-assigned unique ID for this managed resource.
name String
Output only. The name of the group.
pulumiLabels Map<String>
The combination of labels configured directly on the resource and default labels configured on the provider.
updateTime String
Output only. The timestamp when the group was last updated.

Look up Existing Group Resource

Get an existing Group resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: GroupState, opts?: CustomResourceOptions): Group
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        create_time: Optional[str] = None,
        description: Optional[str] = None,
        display_name: Optional[str] = None,
        effective_labels: Optional[Mapping[str, str]] = None,
        group_id: Optional[str] = None,
        labels: Optional[Mapping[str, str]] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        pulumi_labels: Optional[Mapping[str, str]] = None,
        update_time: Optional[str] = None) -> Group
func GetGroup(ctx *Context, name string, id IDInput, state *GroupState, opts ...ResourceOption) (*Group, error)
public static Group Get(string name, Input<string> id, GroupState? state, CustomResourceOptions? opts = null)
public static Group get(String name, Output<String> id, GroupState state, CustomResourceOptions options)
resources:  _:    type: gcp:migrationcenter:Group    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CreateTime string
Output only. The timestamp when the group was created.
Description string
Optional. The description of the group.
DisplayName string
Optional. User-friendly display name.
EffectiveLabels Dictionary<string, string>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
GroupId Changes to this property will trigger replacement. string
Required. User specified ID for the group. It will become the last component of the group name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: a-z?.


Labels Dictionary<string, string>
Labels as key value pairs. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
Location Changes to this property will trigger replacement. string
The location of the group.
Name string
Output only. The name of the group.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
PulumiLabels Dictionary<string, string>
The combination of labels configured directly on the resource and default labels configured on the provider.
UpdateTime string
Output only. The timestamp when the group was last updated.
CreateTime string
Output only. The timestamp when the group was created.
Description string
Optional. The description of the group.
DisplayName string
Optional. User-friendly display name.
EffectiveLabels map[string]string
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
GroupId Changes to this property will trigger replacement. string
Required. User specified ID for the group. It will become the last component of the group name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: a-z?.


Labels map[string]string
Labels as key value pairs. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
Location Changes to this property will trigger replacement. string
The location of the group.
Name string
Output only. The name of the group.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
PulumiLabels map[string]string
The combination of labels configured directly on the resource and default labels configured on the provider.
UpdateTime string
Output only. The timestamp when the group was last updated.
createTime String
Output only. The timestamp when the group was created.
description String
Optional. The description of the group.
displayName String
Optional. User-friendly display name.
effectiveLabels Map<String,String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
groupId Changes to this property will trigger replacement. String
Required. User specified ID for the group. It will become the last component of the group name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: a-z?.


labels Map<String,String>
Labels as key value pairs. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
location Changes to this property will trigger replacement. String
The location of the group.
name String
Output only. The name of the group.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
pulumiLabels Map<String,String>
The combination of labels configured directly on the resource and default labels configured on the provider.
updateTime String
Output only. The timestamp when the group was last updated.
createTime string
Output only. The timestamp when the group was created.
description string
Optional. The description of the group.
displayName string
Optional. User-friendly display name.
effectiveLabels {[key: string]: string}
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
groupId Changes to this property will trigger replacement. string
Required. User specified ID for the group. It will become the last component of the group name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: a-z?.


labels {[key: string]: string}
Labels as key value pairs. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
location Changes to this property will trigger replacement. string
The location of the group.
name string
Output only. The name of the group.
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
pulumiLabels {[key: string]: string}
The combination of labels configured directly on the resource and default labels configured on the provider.
updateTime string
Output only. The timestamp when the group was last updated.
create_time str
Output only. The timestamp when the group was created.
description str
Optional. The description of the group.
display_name str
Optional. User-friendly display name.
effective_labels Mapping[str, str]
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
group_id Changes to this property will trigger replacement. str
Required. User specified ID for the group. It will become the last component of the group name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: a-z?.


labels Mapping[str, str]
Labels as key value pairs. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
location Changes to this property will trigger replacement. str
The location of the group.
name str
Output only. The name of the group.
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
pulumi_labels Mapping[str, str]
The combination of labels configured directly on the resource and default labels configured on the provider.
update_time str
Output only. The timestamp when the group was last updated.
createTime String
Output only. The timestamp when the group was created.
description String
Optional. The description of the group.
displayName String
Optional. User-friendly display name.
effectiveLabels Map<String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
groupId Changes to this property will trigger replacement. String
Required. User specified ID for the group. It will become the last component of the group name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: a-z?.


labels Map<String>
Labels as key value pairs. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
location Changes to this property will trigger replacement. String
The location of the group.
name String
Output only. The name of the group.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
pulumiLabels Map<String>
The combination of labels configured directly on the resource and default labels configured on the provider.
updateTime String
Output only. The timestamp when the group was last updated.

Import

Group can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/groups/{{group_id}}

  • {{project}}/{{location}}/{{group_id}}

  • {{location}}/{{group_id}}

When using the pulumi import command, Group can be imported using one of the formats above. For example:

$ pulumi import gcp:migrationcenter/group:Group default projects/{{project}}/locations/{{location}}/groups/{{group_id}}
Copy
$ pulumi import gcp:migrationcenter/group:Group default {{project}}/{{location}}/{{group_id}}
Copy
$ pulumi import gcp:migrationcenter/group:Group default {{location}}/{{group_id}}
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.