vsphere_tag
The vsphere_tag
data source can be used to reference tags that are not managed by Terraform. Its attributes are exactly the same as the vsphere_tag
resource, and, like importing, the data source takes a name and category to search on. The id
and other attributes are then populated with the data found by the search.
NOTE: Tagging support is unsupported on direct ESXi connections and requires vCenter 6.0 or higher.
Example Usage
data "vsphere_tag_category" "category" { name = "terraform-test-category" } data "vsphere_tag" "tag" { name = "terraform-test-tag" category_id = "${data.vsphere_tag_category.category.id}" }
Argument Reference
The following arguments are supported:
-
name
- (Required) The name of the tag. -
category_id
- (Required) The ID of the tag category the tag is located in.
Attribute Reference
In addition to the id
being exported, all of the fields that are available in the vsphere_tag
resource are also populated. See that page for further details.
© 2018 HashiCorpLicensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/vsphere/d/tag.html