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",
},
});
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",
})
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
})
}
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" },
},
});
});
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());
}
}
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
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)
type: gcp:migrationcenter:Group
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args GroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args GroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
var gcpGroupResource = new Group("gcpGroupResource", GroupArgs.builder()
.groupId("string")
.location("string")
.description("string")
.displayName("string")
.labels(Map.of("string", "string"))
.project("string")
.build());
gcp_group_resource = gcp.migrationcenter.Group("gcpGroupResource",
group_id="string",
location="string",
description="string",
display_name="string",
labels={
"string": "string",
},
project="string")
const gcpGroupResource = new gcp.migrationcenter.Group("gcpGroupResource", {
groupId: "string",
location: "string",
description: "string",
displayName: "string",
labels: {
string: "string",
},
project: "string",
});
type: gcp:migrationcenter:Group
properties:
description: string
displayName: string
groupId: string
labels:
string: string
location: string
project: string
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
The Group resource accepts the following input properties:
- Group
Id 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 string
- The location of the group.
- Description string
- Optional. The description of the group.
- Display
Name 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 string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Group
Id 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 string
- The location of the group.
- Description string
- Optional. The description of the group.
- Display
Name 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 string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- group
Id 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 String
- The location of the group.
- description String
- Optional. The description of the group.
- display
Name 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 String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- group
Id 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 string
- The location of the group.
- description string
- Optional. The description of the group.
- display
Name 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 string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- group_
id 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 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 str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- group
Id 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 String
- The location of the group.
- description String
- Optional. The description of the group.
- display
Name 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 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:
- Create
Time string - Output only. The timestamp when the group was created.
- Effective
Labels 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.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Update
Time string - Output only. The timestamp when the group was last updated.
- Create
Time string - Output only. The timestamp when the group was created.
- Effective
Labels 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.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Update
Time string - Output only. The timestamp when the group was last updated.
- create
Time String - Output only. The timestamp when the group was created.
- effective
Labels 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.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time String - Output only. The timestamp when the group was last updated.
- create
Time string - Output only. The timestamp when the group was created.
- effective
Labels {[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.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time 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.
- create
Time String - Output only. The timestamp when the group was created.
- effective
Labels 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.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time 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)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Create
Time string - Output only. The timestamp when the group was created.
- Description string
- Optional. The description of the group.
- Display
Name string - Optional. User-friendly display name.
- Effective
Labels 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.
- Group
Id 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 string
- The location of the group.
- Name string
- Output only. The name of the group.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Update
Time string - Output only. The timestamp when the group was last updated.
- Create
Time string - Output only. The timestamp when the group was created.
- Description string
- Optional. The description of the group.
- Display
Name string - Optional. User-friendly display name.
- Effective
Labels 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.
- Group
Id 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 string
- The location of the group.
- Name string
- Output only. The name of the group.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Update
Time string - Output only. The timestamp when the group was last updated.
- create
Time String - Output only. The timestamp when the group was created.
- description String
- Optional. The description of the group.
- display
Name String - Optional. User-friendly display name.
- effective
Labels 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.
- group
Id 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 String
- The location of the group.
- name String
- Output only. The name of the group.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time String - Output only. The timestamp when the group was last updated.
- create
Time string - Output only. The timestamp when the group was created.
- description string
- Optional. The description of the group.
- display
Name string - Optional. User-friendly display name.
- effective
Labels {[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.
- group
Id 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 string
- The location of the group.
- name string
- Output only. The name of the group.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time 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 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 str
- The location of the group.
- name str
- Output only. The name of the group.
- project 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.
- create
Time String - Output only. The timestamp when the group was created.
- description String
- Optional. The description of the group.
- display
Name String - Optional. User-friendly display name.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- group
Id 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 String
- The location of the group.
- name String
- Output only. The name of the group.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time 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}}
$ pulumi import gcp:migrationcenter/group:Group default {{project}}/{{location}}/{{group_id}}
$ pulumi import gcp:migrationcenter/group:Group default {{location}}/{{group_id}}
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.