This Terraform module either creates or imports a list of tags grouped in a tag category in your VMware Cloud on AWS or VMware vSphere on‑premises environment. You use these tags to label your inventory objects with metadata to make it easier to sort and search for these objects.
Tags and categories can span multiple vCenter Server instances. When you use Hybrid Linked Mode, tags and tag categories are maintained across your linked domain. So in this mode, the on‑premises and VMware Cloud on AWS software‑defined data centers (SDDCs) share tags and tag attributes. If multiple on‑premises vCenter Server instances are configured to use Enhanced Linked Mode, tags and categories are replicated across the vCenter Server instances.
module "vsphere_tags" {
source = "aws-ia/tags/vsphere"
version = ">= 0.0.1"
tag_category_name = "example-category"
tag_category_description = "Example tag category."
tag_category_cardinality = "MULTIPLE"
create_tag_category = true
create_tags = true
tags = {
terraform = "Managed by Terraform"
project = "terraform-vsphere-tags"
}
}
module "vsphere_tags" {
source = "aws-ia/tags/vsphere"
version = ">= 0.0.1"
tag_category_name = "example-category"
create_tag_category = false
create_tags = true
tags = {
terraform = "Managed by Terraform"
project = "terraform-vsphere-tags"
}
}
module "vsphere_tags" {
source = "aws-ia/tags/vsphere"
version = ">= 0.0.1"
tag_category_name = "example-category"
create_tag_category = false
create_tags = false
tags = {
terraform = "Managed by Terraform"
project = "terraform-vsphere-tags"
}
}
Name | Version |
---|---|
terraform | >= 1.1.0 |
vsphere | >= 2.1.0 |
Name | Version |
---|---|
vsphere | >= 2.1.0 |
No modules.
Name | Type |
---|---|
vsphere_tag.tags | resource |
vsphere_tag_category.category | resource |
vsphere_tag.tags | data source |
vsphere_tag_category.category | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
tag_category_name | The name of the vSphere tag category. | string |
n/a | yes |
tags | Map of strings defining vSphere tag names and descriptions. | map(string) |
n/a | yes |
create_tag_category | If true, a new vSphere tag category will be created. | bool |
true |
no |
create_tags | If true, new vSphere tags will be created for each entry. | bool |
true |
no |
tag_category_associable_types | A list object types that this category to which this category can be assigned (https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/resources/tag_category#associable-object-types). | list(string) |
[ |
no |
tag_category_cardinality | The number of tags that can be assigned from this category to a single object at once. | string |
"MULTIPLE" |
no |
tag_category_description | The description of the vSphere tag category. | string |
null |
no |
Name | Description |
---|---|
tag_category | The vSphere tag category. |
tags | The list of vSphere tags. |