1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. tags
  5. TagKey
Google Cloud v8.23.0 published on Monday, Mar 24, 2025 by Pulumi

gcp.tags.TagKey

Explore with Pulumi AI

A TagKey, used to group a set of TagValues.

To get more information about TagKey, see:

Example Usage

Tag Key Basic

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

const key = new gcp.tags.TagKey("key", {
    parent: "organizations/123456789",
    shortName: "keyname",
    description: "For keyname resources.",
});
Copy
import pulumi
import pulumi_gcp as gcp

key = gcp.tags.TagKey("key",
    parent="organizations/123456789",
    short_name="keyname",
    description="For keyname resources.")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tags.NewTagKey(ctx, "key", &tags.TagKeyArgs{
			Parent:      pulumi.String("organizations/123456789"),
			ShortName:   pulumi.String("keyname"),
			Description: pulumi.String("For keyname resources."),
		})
		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 key = new Gcp.Tags.TagKey("key", new()
    {
        Parent = "organizations/123456789",
        ShortName = "keyname",
        Description = "For keyname resources.",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.tags.TagKey;
import com.pulumi.gcp.tags.TagKeyArgs;
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 key = new TagKey("key", TagKeyArgs.builder()
            .parent("organizations/123456789")
            .shortName("keyname")
            .description("For keyname resources.")
            .build());

    }
}
Copy
resources:
  key:
    type: gcp:tags:TagKey
    properties:
      parent: organizations/123456789
      shortName: keyname
      description: For keyname resources.
Copy

Create TagKey Resource

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

Constructor syntax

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

@overload
def TagKey(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           parent: Optional[str] = None,
           short_name: Optional[str] = None,
           description: Optional[str] = None,
           purpose: Optional[str] = None,
           purpose_data: Optional[Mapping[str, str]] = None)
func NewTagKey(ctx *Context, name string, args TagKeyArgs, opts ...ResourceOption) (*TagKey, error)
public TagKey(string name, TagKeyArgs args, CustomResourceOptions? opts = null)
public TagKey(String name, TagKeyArgs args)
public TagKey(String name, TagKeyArgs args, CustomResourceOptions options)
type: gcp:tags:TagKey
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. TagKeyArgs
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. TagKeyArgs
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. TagKeyArgs
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. TagKeyArgs
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. TagKeyArgs
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 tagKeyResource = new Gcp.Tags.TagKey("tagKeyResource", new()
{
    Parent = "string",
    ShortName = "string",
    Description = "string",
    Purpose = "string",
    PurposeData = 
    {
        { "string", "string" },
    },
});
Copy
example, err := tags.NewTagKey(ctx, "tagKeyResource", &tags.TagKeyArgs{
	Parent:      pulumi.String("string"),
	ShortName:   pulumi.String("string"),
	Description: pulumi.String("string"),
	Purpose:     pulumi.String("string"),
	PurposeData: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var tagKeyResource = new TagKey("tagKeyResource", TagKeyArgs.builder()
    .parent("string")
    .shortName("string")
    .description("string")
    .purpose("string")
    .purposeData(Map.of("string", "string"))
    .build());
Copy
tag_key_resource = gcp.tags.TagKey("tagKeyResource",
    parent="string",
    short_name="string",
    description="string",
    purpose="string",
    purpose_data={
        "string": "string",
    })
Copy
const tagKeyResource = new gcp.tags.TagKey("tagKeyResource", {
    parent: "string",
    shortName: "string",
    description: "string",
    purpose: "string",
    purposeData: {
        string: "string",
    },
});
Copy
type: gcp:tags:TagKey
properties:
    description: string
    parent: string
    purpose: string
    purposeData:
        string: string
    shortName: string
Copy

TagKey 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 TagKey resource accepts the following input properties:

Parent
This property is required.
Changes to this property will trigger replacement.
string
Input only. The resource name of the new TagKey's parent. Must be of the form organizations/{org_id} or projects/{project_id_or_number}.
ShortName
This property is required.
Changes to this property will trigger replacement.
string
Input only. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace. The short name can have a maximum length of 256 characters. The permitted character set for the shortName includes all UTF-8 encoded Unicode characters except single quotes ('), double quotes ("), backslashes (\), and forward slashes (/).


Description string
User-assigned description of the TagKey. Must not exceed 256 characters.
Purpose Changes to this property will trigger replacement. string
Optional. A purpose cannot be changed once set. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. Possible values are: GCE_FIREWALL.
PurposeData Changes to this property will trigger replacement. Dictionary<string, string>
Optional. Purpose data cannot be changed once set. Purpose data corresponds to the policy system that the tag is intended for. For example, the GCE_FIREWALL purpose expects data in the following format: network = "<project-name>/<vpc-name>".
Parent
This property is required.
Changes to this property will trigger replacement.
string
Input only. The resource name of the new TagKey's parent. Must be of the form organizations/{org_id} or projects/{project_id_or_number}.
ShortName
This property is required.
Changes to this property will trigger replacement.
string
Input only. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace. The short name can have a maximum length of 256 characters. The permitted character set for the shortName includes all UTF-8 encoded Unicode characters except single quotes ('), double quotes ("), backslashes (\), and forward slashes (/).


Description string
User-assigned description of the TagKey. Must not exceed 256 characters.
Purpose Changes to this property will trigger replacement. string
Optional. A purpose cannot be changed once set. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. Possible values are: GCE_FIREWALL.
PurposeData Changes to this property will trigger replacement. map[string]string
Optional. Purpose data cannot be changed once set. Purpose data corresponds to the policy system that the tag is intended for. For example, the GCE_FIREWALL purpose expects data in the following format: network = "<project-name>/<vpc-name>".
parent
This property is required.
Changes to this property will trigger replacement.
String
Input only. The resource name of the new TagKey's parent. Must be of the form organizations/{org_id} or projects/{project_id_or_number}.
shortName
This property is required.
Changes to this property will trigger replacement.
String
Input only. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace. The short name can have a maximum length of 256 characters. The permitted character set for the shortName includes all UTF-8 encoded Unicode characters except single quotes ('), double quotes ("), backslashes (\), and forward slashes (/).


description String
User-assigned description of the TagKey. Must not exceed 256 characters.
purpose Changes to this property will trigger replacement. String
Optional. A purpose cannot be changed once set. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. Possible values are: GCE_FIREWALL.
purposeData Changes to this property will trigger replacement. Map<String,String>
Optional. Purpose data cannot be changed once set. Purpose data corresponds to the policy system that the tag is intended for. For example, the GCE_FIREWALL purpose expects data in the following format: network = "<project-name>/<vpc-name>".
parent
This property is required.
Changes to this property will trigger replacement.
string
Input only. The resource name of the new TagKey's parent. Must be of the form organizations/{org_id} or projects/{project_id_or_number}.
shortName
This property is required.
Changes to this property will trigger replacement.
string
Input only. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace. The short name can have a maximum length of 256 characters. The permitted character set for the shortName includes all UTF-8 encoded Unicode characters except single quotes ('), double quotes ("), backslashes (\), and forward slashes (/).


description string
User-assigned description of the TagKey. Must not exceed 256 characters.
purpose Changes to this property will trigger replacement. string
Optional. A purpose cannot be changed once set. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. Possible values are: GCE_FIREWALL.
purposeData Changes to this property will trigger replacement. {[key: string]: string}
Optional. Purpose data cannot be changed once set. Purpose data corresponds to the policy system that the tag is intended for. For example, the GCE_FIREWALL purpose expects data in the following format: network = "<project-name>/<vpc-name>".
parent
This property is required.
Changes to this property will trigger replacement.
str
Input only. The resource name of the new TagKey's parent. Must be of the form organizations/{org_id} or projects/{project_id_or_number}.
short_name
This property is required.
Changes to this property will trigger replacement.
str
Input only. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace. The short name can have a maximum length of 256 characters. The permitted character set for the shortName includes all UTF-8 encoded Unicode characters except single quotes ('), double quotes ("), backslashes (\), and forward slashes (/).


description str
User-assigned description of the TagKey. Must not exceed 256 characters.
purpose Changes to this property will trigger replacement. str
Optional. A purpose cannot be changed once set. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. Possible values are: GCE_FIREWALL.
purpose_data Changes to this property will trigger replacement. Mapping[str, str]
Optional. Purpose data cannot be changed once set. Purpose data corresponds to the policy system that the tag is intended for. For example, the GCE_FIREWALL purpose expects data in the following format: network = "<project-name>/<vpc-name>".
parent
This property is required.
Changes to this property will trigger replacement.
String
Input only. The resource name of the new TagKey's parent. Must be of the form organizations/{org_id} or projects/{project_id_or_number}.
shortName
This property is required.
Changes to this property will trigger replacement.
String
Input only. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace. The short name can have a maximum length of 256 characters. The permitted character set for the shortName includes all UTF-8 encoded Unicode characters except single quotes ('), double quotes ("), backslashes (\), and forward slashes (/).


description String
User-assigned description of the TagKey. Must not exceed 256 characters.
purpose Changes to this property will trigger replacement. String
Optional. A purpose cannot be changed once set. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. Possible values are: GCE_FIREWALL.
purposeData Changes to this property will trigger replacement. Map<String>
Optional. Purpose data cannot be changed once set. Purpose data corresponds to the policy system that the tag is intended for. For example, the GCE_FIREWALL purpose expects data in the following format: network = "<project-name>/<vpc-name>".

Outputs

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

CreateTime string
Output only. Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
Id string
The provider-assigned unique ID for this managed resource.
Name string
The generated numeric id for the TagKey.
NamespacedName string
Output only. Namespaced name of the TagKey.
UpdateTime string
Output only. Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
CreateTime string
Output only. Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
Id string
The provider-assigned unique ID for this managed resource.
Name string
The generated numeric id for the TagKey.
NamespacedName string
Output only. Namespaced name of the TagKey.
UpdateTime string
Output only. Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
createTime String
Output only. Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
id String
The provider-assigned unique ID for this managed resource.
name String
The generated numeric id for the TagKey.
namespacedName String
Output only. Namespaced name of the TagKey.
updateTime String
Output only. Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
createTime string
Output only. Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
id string
The provider-assigned unique ID for this managed resource.
name string
The generated numeric id for the TagKey.
namespacedName string
Output only. Namespaced name of the TagKey.
updateTime string
Output only. Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
create_time str
Output only. Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
id str
The provider-assigned unique ID for this managed resource.
name str
The generated numeric id for the TagKey.
namespaced_name str
Output only. Namespaced name of the TagKey.
update_time str
Output only. Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
createTime String
Output only. Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
id String
The provider-assigned unique ID for this managed resource.
name String
The generated numeric id for the TagKey.
namespacedName String
Output only. Namespaced name of the TagKey.
updateTime String
Output only. Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Look up Existing TagKey Resource

Get an existing TagKey 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?: TagKeyState, opts?: CustomResourceOptions): TagKey
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        create_time: Optional[str] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        namespaced_name: Optional[str] = None,
        parent: Optional[str] = None,
        purpose: Optional[str] = None,
        purpose_data: Optional[Mapping[str, str]] = None,
        short_name: Optional[str] = None,
        update_time: Optional[str] = None) -> TagKey
func GetTagKey(ctx *Context, name string, id IDInput, state *TagKeyState, opts ...ResourceOption) (*TagKey, error)
public static TagKey Get(string name, Input<string> id, TagKeyState? state, CustomResourceOptions? opts = null)
public static TagKey get(String name, Output<String> id, TagKeyState state, CustomResourceOptions options)
resources:  _:    type: gcp:tags:TagKey    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. Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
Description string
User-assigned description of the TagKey. Must not exceed 256 characters.
Name string
The generated numeric id for the TagKey.
NamespacedName string
Output only. Namespaced name of the TagKey.
Parent Changes to this property will trigger replacement. string
Input only. The resource name of the new TagKey's parent. Must be of the form organizations/{org_id} or projects/{project_id_or_number}.
Purpose Changes to this property will trigger replacement. string
Optional. A purpose cannot be changed once set. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. Possible values are: GCE_FIREWALL.
PurposeData Changes to this property will trigger replacement. Dictionary<string, string>
Optional. Purpose data cannot be changed once set. Purpose data corresponds to the policy system that the tag is intended for. For example, the GCE_FIREWALL purpose expects data in the following format: network = "<project-name>/<vpc-name>".
ShortName Changes to this property will trigger replacement. string
Input only. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace. The short name can have a maximum length of 256 characters. The permitted character set for the shortName includes all UTF-8 encoded Unicode characters except single quotes ('), double quotes ("), backslashes (\), and forward slashes (/).


UpdateTime string
Output only. Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
CreateTime string
Output only. Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
Description string
User-assigned description of the TagKey. Must not exceed 256 characters.
Name string
The generated numeric id for the TagKey.
NamespacedName string
Output only. Namespaced name of the TagKey.
Parent Changes to this property will trigger replacement. string
Input only. The resource name of the new TagKey's parent. Must be of the form organizations/{org_id} or projects/{project_id_or_number}.
Purpose Changes to this property will trigger replacement. string
Optional. A purpose cannot be changed once set. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. Possible values are: GCE_FIREWALL.
PurposeData Changes to this property will trigger replacement. map[string]string
Optional. Purpose data cannot be changed once set. Purpose data corresponds to the policy system that the tag is intended for. For example, the GCE_FIREWALL purpose expects data in the following format: network = "<project-name>/<vpc-name>".
ShortName Changes to this property will trigger replacement. string
Input only. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace. The short name can have a maximum length of 256 characters. The permitted character set for the shortName includes all UTF-8 encoded Unicode characters except single quotes ('), double quotes ("), backslashes (\), and forward slashes (/).


UpdateTime string
Output only. Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
createTime String
Output only. Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
description String
User-assigned description of the TagKey. Must not exceed 256 characters.
name String
The generated numeric id for the TagKey.
namespacedName String
Output only. Namespaced name of the TagKey.
parent Changes to this property will trigger replacement. String
Input only. The resource name of the new TagKey's parent. Must be of the form organizations/{org_id} or projects/{project_id_or_number}.
purpose Changes to this property will trigger replacement. String
Optional. A purpose cannot be changed once set. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. Possible values are: GCE_FIREWALL.
purposeData Changes to this property will trigger replacement. Map<String,String>
Optional. Purpose data cannot be changed once set. Purpose data corresponds to the policy system that the tag is intended for. For example, the GCE_FIREWALL purpose expects data in the following format: network = "<project-name>/<vpc-name>".
shortName Changes to this property will trigger replacement. String
Input only. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace. The short name can have a maximum length of 256 characters. The permitted character set for the shortName includes all UTF-8 encoded Unicode characters except single quotes ('), double quotes ("), backslashes (\), and forward slashes (/).


updateTime String
Output only. Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
createTime string
Output only. Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
description string
User-assigned description of the TagKey. Must not exceed 256 characters.
name string
The generated numeric id for the TagKey.
namespacedName string
Output only. Namespaced name of the TagKey.
parent Changes to this property will trigger replacement. string
Input only. The resource name of the new TagKey's parent. Must be of the form organizations/{org_id} or projects/{project_id_or_number}.
purpose Changes to this property will trigger replacement. string
Optional. A purpose cannot be changed once set. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. Possible values are: GCE_FIREWALL.
purposeData Changes to this property will trigger replacement. {[key: string]: string}
Optional. Purpose data cannot be changed once set. Purpose data corresponds to the policy system that the tag is intended for. For example, the GCE_FIREWALL purpose expects data in the following format: network = "<project-name>/<vpc-name>".
shortName Changes to this property will trigger replacement. string
Input only. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace. The short name can have a maximum length of 256 characters. The permitted character set for the shortName includes all UTF-8 encoded Unicode characters except single quotes ('), double quotes ("), backslashes (\), and forward slashes (/).


updateTime string
Output only. Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
create_time str
Output only. Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
description str
User-assigned description of the TagKey. Must not exceed 256 characters.
name str
The generated numeric id for the TagKey.
namespaced_name str
Output only. Namespaced name of the TagKey.
parent Changes to this property will trigger replacement. str
Input only. The resource name of the new TagKey's parent. Must be of the form organizations/{org_id} or projects/{project_id_or_number}.
purpose Changes to this property will trigger replacement. str
Optional. A purpose cannot be changed once set. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. Possible values are: GCE_FIREWALL.
purpose_data Changes to this property will trigger replacement. Mapping[str, str]
Optional. Purpose data cannot be changed once set. Purpose data corresponds to the policy system that the tag is intended for. For example, the GCE_FIREWALL purpose expects data in the following format: network = "<project-name>/<vpc-name>".
short_name Changes to this property will trigger replacement. str
Input only. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace. The short name can have a maximum length of 256 characters. The permitted character set for the shortName includes all UTF-8 encoded Unicode characters except single quotes ('), double quotes ("), backslashes (\), and forward slashes (/).


update_time str
Output only. Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
createTime String
Output only. Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
description String
User-assigned description of the TagKey. Must not exceed 256 characters.
name String
The generated numeric id for the TagKey.
namespacedName String
Output only. Namespaced name of the TagKey.
parent Changes to this property will trigger replacement. String
Input only. The resource name of the new TagKey's parent. Must be of the form organizations/{org_id} or projects/{project_id_or_number}.
purpose Changes to this property will trigger replacement. String
Optional. A purpose cannot be changed once set. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. Possible values are: GCE_FIREWALL.
purposeData Changes to this property will trigger replacement. Map<String>
Optional. Purpose data cannot be changed once set. Purpose data corresponds to the policy system that the tag is intended for. For example, the GCE_FIREWALL purpose expects data in the following format: network = "<project-name>/<vpc-name>".
shortName Changes to this property will trigger replacement. String
Input only. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace. The short name can have a maximum length of 256 characters. The permitted character set for the shortName includes all UTF-8 encoded Unicode characters except single quotes ('), double quotes ("), backslashes (\), and forward slashes (/).


updateTime String
Output only. Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Import

TagKey can be imported using any of these accepted formats:

  • tagKeys/{{name}}

  • {{name}}

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

$ pulumi import gcp:tags/tagKey:TagKey default tagKeys/{{name}}
Copy
$ pulumi import gcp:tags/tagKey:TagKey default {{name}}
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.