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:
- API documentation
- How-to Guides
Create a TagTemplate Resource
new TagTemplate(name: string, args: TagTemplateArgs, opts?: CustomResourceOptions);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<Tag
Template Field Args> 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 stringId The id of the tag template to create.
- Display
Name string 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 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
[]Tag
Template Field 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 stringId The id of the tag template to create.
- Display
Name string 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 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
Tag
Template Field[] 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 stringId The id of the tag template to create.
- display
Name string The display name for this template.
- force
Delete 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[Tag
Template Field] 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_ strid 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:
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): TagTemplatestatic 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:
- Display
Name string The display name for this template.
- Fields
List<Tag
Template Field Args> 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 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.
- Tag
Template stringId The id of the tag template to create.
- Display
Name string The display name for this template.
- Fields
[]Tag
Template Field 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 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.
- Tag
Template stringId The id of the tag template to create.
- display
Name string The display name for this template.
- fields
Tag
Template Field[] 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 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.
- tag
Template stringId The id of the tag template to create.
- display_
name str The display name for this template.
- fields
List[Tag
Template Field] 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_ strid The id of the tag template to create.
Supporting Types
TagTemplateField
- Field
Id string The identifier for this object. Format specified above.
- Type
Tag
Template Field Type Args The type of value this tag field can contain. Structure is documented below.
- Display
Name string The display name for this template.
- Is
Required 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.
- Field
Id string The identifier for this object. Format specified above.
- Type
Tag
Template Field Type The type of value this tag field can contain. Structure is documented below.
- Display
Name string The display name for this template.
- Is
Required 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.
- field
Id string The identifier for this object. Format specified above.
- type
Tag
Template Field Type The type of value this tag field can contain. Structure is documented below.
- display
Name string The display name for this template.
- is
Required 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.
- field
Id str The identifier for this object. Format specified above.
- type
Dict[Tag
Template Field Type] The type of value this tag field can contain. Structure is documented below.
- display_
name str The display name for this template.
- is
Required 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
- Enum
Type TagTemplate Field Type Enum Type Args Represents an enum type. Exactly one of
primitive_typeorenum_typemust be set Structure is documented below.- Primitive
Type string Represents primitive types - string, bool etc. Exactly one of
primitive_typeorenum_typemust be set
- Enum
Type TagTemplate Field Type Enum Type Represents an enum type. Exactly one of
primitive_typeorenum_typemust be set Structure is documented below.- Primitive
Type string Represents primitive types - string, bool etc. Exactly one of
primitive_typeorenum_typemust be set
- enum
Type TagTemplate Field Type Enum Type Represents an enum type. Exactly one of
primitive_typeorenum_typemust be set Structure is documented below.- primitive
Type string Represents primitive types - string, bool etc. Exactly one of
primitive_typeorenum_typemust be set
- enum
Type Dict[TagTemplate Field Type Enum Type] Represents an enum type. Exactly one of
primitive_typeorenum_typemust be set Structure is documented below.- primitive
Type str Represents primitive types - string, bool etc. Exactly one of
primitive_typeorenum_typemust be set
TagTemplateFieldTypeEnumType
- Allowed
Values List<TagTemplate Field Type Enum Type Allowed Value Args> 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.
- Allowed
Values []TagTemplate Field Type Enum Type Allowed Value 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.
- allowed
Values TagTemplate Field Type Enum Type Allowed Value[] 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.
- allowed
Values List[TagTemplate Field Type Enum Type Allowed Value] 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
- Display
Name string The display name for this template.
- Display
Name string The display name for this template.
- display
Name 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-betaTerraform Provider.