Skip to content

Inventory Tags

Location in GUI: Inventory » Tags

Diagram
NameTypeConstraintMandatoryDefault Value
tagsList[tags]No

NameTypeConstraintMandatoryDefault Value
nameStringYes
descriptionStringNo

Inventory tags allow you to define tags for categorizing and organizing devices in Catalyst Center independently of the templates structure. Use this section when you only want to tag devices and do not need to associate the tag with CLI Templates. Tags defined here can be referenced from Device entries via the tags attribute. Tags that already exist in Catalyst Center (built-in or created outside Terraform) do not need to be declared here, the module looks them up automatically when a device references them. For tags that should be assignable to both templates and devices, use Tags under the templates section instead. Applicable to both SDA fabric and non-fabric deployments.

Example-1: Define inventory tags decoupled from the templates section. The tags can later be referenced by devices in inventory.devices.tags:

catalyst_center:
inventory:
tags:
- name: ThisIsMyTAG
description: Tag for my devices
- name: Secure
description: Secured device

Example-2: Reference an inventory tag from a device. The tag will be created (if defined under inventory.tags or templates.tags) or looked up via the data source if it already exists in Catalyst Center:

catalyst_center:
inventory:
tags:
- name: ThisIsMyTAG
description: Tag for my devices
devices:
- name: SWV_Core
fqdn_name: SWV_Core
device_ip: 192.168.6.1
pid: C9500-40X
state: ASSIGN
device_role: CORE
site: Global/UK/Reading/Core_Green_Park
tags:
- ThisIsMyTAG

Example-3: Reference a pre-existing tag (built-in or created outside Terraform) without declaring it. The module will look it up via the Catalyst Center API and use it when assigning the device:

catalyst_center:
inventory:
devices:
- name: SWV_Core
fqdn_name: SWV_Core
device_ip: 192.168.6.1
pid: C9500-40X
state: ASSIGN
device_role: CORE
site: Global/UK/Reading/Core_Green_Park
tags:
- PreExistingTag