TagTemplate

A tag template defines a tag, which can have one or more typed fields. The template is used to create and attach the tag to GCP resources.

To get more information about TagTemplate, see:

Create a TagTemplate Resource

def TagTemplate(resource_name, opts=None, display_name=None, fields=None, force_delete=None, project=None, region=None, tag_template_id=None, __props__=None);
func NewTagTemplate(ctx *Context, name string, args TagTemplateArgs, opts ...ResourceOption) (*TagTemplate, error)
public TagTemplate(string name, TagTemplateArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args TagTemplateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args TagTemplateArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args TagTemplateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

TagTemplate Resource Properties

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

Inputs

The TagTemplate resource accepts the following input properties:

Fields List<TagTemplateFieldArgs>

Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. Structure is documented below.

TagTemplateId string

The id of the tag template to create.

DisplayName string

The display name for this template.

ForceDelete bool

This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.

Project string

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

Region string

Template location region.

Fields []TagTemplateField

Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. Structure is documented below.

TagTemplateId string

The id of the tag template to create.

DisplayName string

The display name for this template.

ForceDelete bool

This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.

Project string

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

Region string

Template location region.

fields TagTemplateField[]

Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. Structure is documented below.

tagTemplateId string

The id of the tag template to create.

displayName string

The display name for this template.

forceDelete boolean

This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.

project string

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

region string

Template location region.

fields List[TagTemplateField]

Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. Structure is documented below.

tag_template_id str

The id of the tag template to create.

display_name str

The display name for this template.

force_delete bool

This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.

project str

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

region str

Template location region.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Name string

- The resource name of the tag template field in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field}

Id string
The provider-assigned unique ID for this managed resource.
Name string

- The resource name of the tag template field in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field}

id string
The provider-assigned unique ID for this managed resource.
name string

- The resource name of the tag template field in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field}

id str
The provider-assigned unique ID for this managed resource.
name str

- The resource name of the tag template field in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field}

Look up an Existing TagTemplate Resource

Get an existing TagTemplate 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?: TagTemplateState, opts?: CustomResourceOptions): TagTemplate
static get(resource_name, id, opts=None, display_name=None, fields=None, force_delete=None, name=None, project=None, region=None, tag_template_id=None, __props__=None);
func GetTagTemplate(ctx *Context, name string, id IDInput, state *TagTemplateState, opts ...ResourceOption) (*TagTemplate, error)
public static TagTemplate Get(string name, Input<string> id, TagTemplateState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

DisplayName string

The display name for this template.

Fields List<TagTemplateFieldArgs>

Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. Structure is documented below.

ForceDelete bool

This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.

Name string

- The resource name of the tag template field in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field}

Project string

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

Region string

Template location region.

TagTemplateId string

The id of the tag template to create.

DisplayName string

The display name for this template.

Fields []TagTemplateField

Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. Structure is documented below.

ForceDelete bool

This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.

Name string

- The resource name of the tag template field in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field}

Project string

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

Region string

Template location region.

TagTemplateId string

The id of the tag template to create.

displayName string

The display name for this template.

fields TagTemplateField[]

Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. Structure is documented below.

forceDelete boolean

This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.

name string

- The resource name of the tag template field in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field}

project string

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

region string

Template location region.

tagTemplateId string

The id of the tag template to create.

display_name str

The display name for this template.

fields List[TagTemplateField]

Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. Structure is documented below.

force_delete bool

This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.

name str

- The resource name of the tag template field in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field}

project str

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

region str

Template location region.

tag_template_id str

The id of the tag template to create.

Supporting Types

TagTemplateField

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

FieldId string

The identifier for this object. Format specified above.

Type TagTemplateFieldTypeArgs

The type of value this tag field can contain. Structure is documented below.

DisplayName string

The display name for this template.

IsRequired bool

Whether this is a required field. Defaults to false.

Name string

- The resource name of the tag template field in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field}

Order int

The order of this field with respect to other fields in this tag template. A higher value indicates a more important field. The value can be negative. Multiple fields can have the same order, and field orders within a tag do not have to be sequential.

FieldId string

The identifier for this object. Format specified above.

Type TagTemplateFieldType

The type of value this tag field can contain. Structure is documented below.

DisplayName string

The display name for this template.

IsRequired bool

Whether this is a required field. Defaults to false.

Name string

- The resource name of the tag template field in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field}

Order int

The order of this field with respect to other fields in this tag template. A higher value indicates a more important field. The value can be negative. Multiple fields can have the same order, and field orders within a tag do not have to be sequential.

fieldId string

The identifier for this object. Format specified above.

type TagTemplateFieldType

The type of value this tag field can contain. Structure is documented below.

displayName string

The display name for this template.

isRequired boolean

Whether this is a required field. Defaults to false.

name string

- The resource name of the tag template field in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field}

order number

The order of this field with respect to other fields in this tag template. A higher value indicates a more important field. The value can be negative. Multiple fields can have the same order, and field orders within a tag do not have to be sequential.

fieldId str

The identifier for this object. Format specified above.

type Dict[TagTemplateFieldType]

The type of value this tag field can contain. Structure is documented below.

display_name str

The display name for this template.

isRequired bool

Whether this is a required field. Defaults to false.

name str

- The resource name of the tag template field in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field}

order float

The order of this field with respect to other fields in this tag template. A higher value indicates a more important field. The value can be negative. Multiple fields can have the same order, and field orders within a tag do not have to be sequential.

TagTemplateFieldType

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

EnumType TagTemplateFieldTypeEnumTypeArgs

Represents an enum type. Exactly one of primitive_type or enum_type must be set Structure is documented below.

PrimitiveType string

Represents primitive types - string, bool etc. Exactly one of primitive_type or enum_type must be set

EnumType TagTemplateFieldTypeEnumType

Represents an enum type. Exactly one of primitive_type or enum_type must be set Structure is documented below.

PrimitiveType string

Represents primitive types - string, bool etc. Exactly one of primitive_type or enum_type must be set

enumType TagTemplateFieldTypeEnumType

Represents an enum type. Exactly one of primitive_type or enum_type must be set Structure is documented below.

primitiveType string

Represents primitive types - string, bool etc. Exactly one of primitive_type or enum_type must be set

enumType Dict[TagTemplateFieldTypeEnumType]

Represents an enum type. Exactly one of primitive_type or enum_type must be set Structure is documented below.

primitiveType str

Represents primitive types - string, bool etc. Exactly one of primitive_type or enum_type must be set

TagTemplateFieldTypeEnumType

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

AllowedValues List<TagTemplateFieldTypeEnumTypeAllowedValueArgs>

The set of allowed values for this enum. The display names of the values must be case-insensitively unique within this set. Currently, enum values can only be added to the list of allowed values. Deletion and renaming of enum values are not supported. Can have up to 500 allowed values. Structure is documented below.

AllowedValues []TagTemplateFieldTypeEnumTypeAllowedValue

The set of allowed values for this enum. The display names of the values must be case-insensitively unique within this set. Currently, enum values can only be added to the list of allowed values. Deletion and renaming of enum values are not supported. Can have up to 500 allowed values. Structure is documented below.

allowedValues TagTemplateFieldTypeEnumTypeAllowedValue[]

The set of allowed values for this enum. The display names of the values must be case-insensitively unique within this set. Currently, enum values can only be added to the list of allowed values. Deletion and renaming of enum values are not supported. Can have up to 500 allowed values. Structure is documented below.

allowedValues List[TagTemplateFieldTypeEnumTypeAllowedValue]

The set of allowed values for this enum. The display names of the values must be case-insensitively unique within this set. Currently, enum values can only be added to the list of allowed values. Deletion and renaming of enum values are not supported. Can have up to 500 allowed values. Structure is documented below.

TagTemplateFieldTypeEnumTypeAllowedValue

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

DisplayName string

The display name for this template.

DisplayName string

The display name for this template.

displayName string

The display name for this template.

display_name str

The display name for this template.

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.