InfiniteLoopIO / terraform-vsphere-tag_lookup

get vsphere tag details

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Terraform vSphere Tag Lookup

vSphere tagging differs from other providers in that it allows multiple cardinality of their tag categories (aka same tag category can be assigned multiple times) and each tag name must exist prior to being applied to a resource.

This Terraform module will lookup details about provided vSphere tags, which includes maps to display human friendly tag names vs vmomi IDs.

Usage

Call the module given a map of existing tags to get their details.

Basic

module tag_lookup {
  source    = <path to module>
  
  tags      =  {
    environment      = ["dev"]
    point-of-contact = ["devops", "finance"]
  }
  separator = "="
}

Requirements

No requirements.

Providers

Name Version
vsphere n/a

Modules

No modules.

Resources

Name Type
vsphere_tag.reference data source
vsphere_tag_category.reference data source

Inputs

Name Description Type Default Required
separator (Optional) string character used to separate tag category and tag name string "/" no
tags (Required) Tags to be discovered, format is map with tag category as key and list of strings as tag names map(list(string)) n/a yes

Outputs

Name Description
details_map Tag display name is key, value contains all other tag details.
id_map Tag ID is key, value contains all other tag details.

License

Apache License, Version 2.0

About

get vsphere tag details

License:Apache License 2.0


Languages

Language:HCL 100.0%