GroupArgs

data class GroupArgs(val description: Output<String>? = null, val displayName: Output<String>? = null, val groupId: Output<String>? = null, val labels: Output<Map<String, String>>? = null, val location: Output<String>? = null, val project: Output<String>? = null) : ConvertibleToJava<GroupArgs>

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",
})
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 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
})
}
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

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}}

Constructors

Link copied to clipboard
constructor(description: Output<String>? = null, displayName: Output<String>? = null, groupId: Output<String>? = null, labels: Output<Map<String, String>>? = null, location: Output<String>? = null, project: Output<String>? = null)

Properties

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

Optional. The description of the group.

Link copied to clipboard
val displayName: Output<String>? = null

Optional. User-friendly display name.

Link copied to clipboard
val groupId: Output<String>? = null

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?.

Link copied to clipboard
val labels: Output<Map<String, String>>? = null

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.

Link copied to clipboard
val location: Output<String>? = null

The location of the group.

Link copied to clipboard
val project: Output<String>? = null

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Functions

Link copied to clipboard
open override fun toJava(): GroupArgs