Skip to content

Template

Set unmanaged: true on a template-device association to look up a template that already exists in Catalyst Center. No local template definition or content file is needed. project_name and name identify the template together, including when another project contains a template with the same name.

catalyst_center:
template_device_association:
templates:
- name: Configure_NTP
project_name: Campus
unmanaged: true
state: ON_CHANGE
deploy_order: AFTER_FABRIC
devices:
- name: EDGE01
variables:
type: local
values:
- name: ntp_server
value: 192.0.2.123

The target device must be present in inventory.devices and eligible for template deployment. The module reads the existing project, template and committed versions through data sources, and manages the deployment only. Removing the association does not delete the controller’s template. Local and CSV variable sources and per-device state/order overrides use the same rules as managed associations.

Omit unmanaged (or set it to false) for a template managed through cli_templates.projects. A template cannot both be defined there and marked unmanaged in an association. Lookup of undeclared projects supported by earlier configurations remains available. For an existing composite template, specify type: COMPOSITE; its members are discovered from the controller.

Location in GUI: Design » CLI Templates

Location in GUI: Design » CLI Templates

NameTypeConstraintMandatoryDefault Value
cli_templatesClasscli_templatesNo

NameTypeConstraintMandatoryDefault Value
templatesClasstemplatesNo

NameTypeConstraintMandatoryDefault Value
projectsListprojectsNo

NameTypeConstraintMandatoryDefault Value
dayn_templatesListdayn_templatesNo
onboarding_templatesListonboarding_templatesNo
composite_templatesListcomposite_templatesNo

dayn_templates (catalyst_center.cli_templates.projects)

Section titled “dayn_templates (catalyst_center.cli_templates.projects)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
descriptionStringmax: 255No
languageChoiceJINJA, VELOCITYNo
device_typesListdevice_typesYes
software_typeStringYes
software_versionStringNo
variablesListvariablesNo
tagsListStringNo
containing_templatesListStringNo
compositeBooleantrue, falseNo
redeploy_templateChoiceALWAYS, NEVER, ON_CHANGENo
deployment_timeoutIntegermin: 10, max: 86400No
copying_configBooleantrue, falseNo
force_push_templateBooleantrue, falseNo

onboarding_templates (catalyst_center.cli_templates.projects)

Section titled “onboarding_templates (catalyst_center.cli_templates.projects)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
descriptionStringmax: 255No
languageChoiceJINJA, VELOCITYNo
device_typesListdevice_typesYes
software_typeStringYes
software_versionStringNo
variablesListvariablesNo
tagsListStringNo
containing_templatesListStringNo
compositeBooleantrue, falseNo
redeploy_templateChoiceALWAYS, NEVER, ON_CHANGENo
deployment_timeoutIntegermin: 10, max: 86400No
copying_configBooleantrue, falseNo
force_push_templateBooleantrue, falseNo

composite_templates (catalyst_center.cli_templates.projects)

Section titled “composite_templates (catalyst_center.cli_templates.projects)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
descriptionStringmax: 255No
languageChoiceJINJA, VELOCITYNo
device_typesListdevice_typesYes
software_typeStringYes
software_versionStringNo
variablesListvariablesNo
tagsListStringNo
containing_templatesListStringNo
compositeBooleantrue, falseNo
redeploy_templateChoiceALWAYS, NEVER, ON_CHANGENo
deployment_timeoutIntegermin: 10, max: 86400No
copying_configBooleantrue, falseNo
force_push_templateBooleantrue, falseNo

device_types (catalyst_center.cli_templates.projects.dayn_templates)

Section titled “device_types (catalyst_center.cli_templates.projects.dayn_templates)”
NameTypeConstraintMandatoryDefault Value
product_familyStringYes
product_seriesStringNo
product_typeStringNo

variables (catalyst_center.cli_templates.projects.dayn_templates)

Section titled “variables (catalyst_center.cli_templates.projects.dayn_templates)”
NameTypeConstraintMandatoryDefault Value
not_paramBooleantrue, falseNo
param_arrayBooleantrue, falseNo
selection_typeChoiceSINGLE_SELECT, MULTI_SELECTNo
data_valuesMapNo
nameStringYes
bindingStringNo
field_nameStringNo
requiredBooleantrue, falseNo
data_typeChoiceSTRING, INTEGER, IPADDRESS, MACADDRESS, SECTIONDIVIDERYes
hint_textStringNo
default_valueStringNo
additional_infoStringNo

NameTypeConstraintMandatoryDefault Value
projectsListprojectsNo

NameTypeConstraintMandatoryDefault Value
dayn_templatesListdayn_templatesNo

dayn_templates (catalyst_center.templates.projects)

Section titled “dayn_templates (catalyst_center.templates.projects)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
descriptionStringmax: 255No
languageChoiceJINJA, VELOCITYNo
device_typesListdevice_typesNo
software_typeStringNo
software_versionStringNo
variablesListvariablesNo
tagsListStringNo
containing_templatesListStringNo
compositeBooleantrue, falseNo
redeploy_templateChoiceALWAYS, NEVER, ON_CHANGENo
deployment_timeoutIntegermin: 10, max: 86400No

dayn_templates (catalyst_center.templates.projects)

Section titled “dayn_templates (catalyst_center.templates.projects)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
descriptionStringNo
languageChoiceJINJA, VELOCITYNo
device_typesListdevice_typesNo
software_typeStringNo
software_versionStringNo
variablesListvariablesNo
tagsListStringNo
containing_templatesListStringNo
compositeBooleantrue, falseNo
redeploy_templateChoiceALWAYS, NEVER, ON_CHANGENo
deployment_timeoutIntegermin: 10, max: 86400No

dayn_templates (catalyst_center.templates.projects)

Section titled “dayn_templates (catalyst_center.templates.projects)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
descriptionStringNo
languageChoiceJINJA, VELOCITYNo
device_typesListdevice_typesNo
software_typeStringNo
software_versionStringNo
variablesListvariablesNo
tagsListStringNo
containing_templatesListStringNo
compositeBooleantrue, falseNo
redeploy_templateChoiceALWAYS, NEVER, ON_CHANGENo

device_types (catalyst_center.templates.projects.dayn_templates)

Section titled “device_types (catalyst_center.templates.projects.dayn_templates)”
NameTypeConstraintMandatoryDefault Value
product_familyStringYes
product_seriesStringNo
product_typeStringNo

variables (catalyst_center.templates.projects.dayn_templates)

Section titled “variables (catalyst_center.templates.projects.dayn_templates)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
field_nameStringNo
requiredBooleantrue, falseNo
data_typeChoiceSTRING, INTEGER, IPADDRESS, MACADDRESS, SECTIONDIVIDERYes
hint_textStringNo
default_valueStringNo
additional_infoStringNo
bindingStringNo
not_paramBooleantrue, falseNo
param_arrayBooleantrue, falseNo
selection_typeChoiceSINGLE_SELECT, MULTI_SELECTNo
data_valuesMapNo

Templates define CLI configuration snippets using Jinja or Velocity templating languages that are pushed to network devices during provisioning. Templates belong to a Project and can target specific device families and software versions. They support parameterized variables, conditional logic, and can be tagged with Tags for organization. Applicable to both SDA fabric and non-fabric deployments.

Note: Every variable declared under variables must be used as a parameter in the template content. Catalyst Center drops any declared variable that is not a parameter of the content, for example a SECTIONDIVIDER, a variable with not_param: true, a {% set %} local, or a variable that the content never references. Terraform then plans the variable back on every run (template_params drift). Declare only the variables that the content uses as parameters.

Example-1: Day-N Jinja Template for Catalyst 9300 ACLs

Section titled “Example-1: Day-N Jinja Template for Catalyst 9300 ACLs”

Day-N template configuration for ongoing network management using Jinja templating to create access list templates targeting Catalyst 9300 series switches.

catalyst_center:
cli_templates:
projects:
- name: Project_DayN
description: Project_DayN
dayn_templates:
- name: access_list_template
description: Access List Template
language: JINJA
composite: false
device_types:
- product_family: Switches and Hubs
product_series: Cisco Catalyst 9300 Series Switches
software_type: IOS-XE

The content of the template must be stored in the templates/ directory inside a JINJA file, with the file name matching the template name:

access_list_template.j2

Terminal window
## Access List
ip access-list standard 20
10 permit 10.0.0.0 0.0.0.255
20 permit 20.0.0.0 0.0.0.255

Example-2: Onboarding Jinja Template for Catalyst 9300 Switches

Section titled “Example-2: Onboarding Jinja Template for Catalyst 9300 Switches”

Onboarding template configuration for initial device provisioning using Jinja templating to automate Day-0 configuration deployment on Catalyst 9300 series switches.

catalyst_center:
cli_templates:
projects:
- name: Project_Onboarding
description: Project_Onboarding
onboarding_templates:
- name: onboarding_template
description: Onboarding Template
language: JINJA
composite: false
device_types:
- product_family: Switches and Hubs
product_series: Cisco Catalyst 9300 Series Switches
software_type: IOS-XE

Example-3: Composite Template Combining Multiple ACL Templates

Section titled “Example-3: Composite Template Combining Multiple ACL Templates”

Composite template configuration combining multiple individual templates into a single deployable unit for complex ACL configurations targeting Catalyst 9300 series switches.

catalyst_center:
cli_templates:
projects:
- name: Project_DayN
description: Project_DayN
dayn_templates:
- name: ACL_COMPOSITE
description: ACL COMPOSITE
language: JINJA
composite: true
device_types:
- product_family: Switches and Hubs
product_series: Cisco Catalyst 9300 Series Switches
software_type: IOS-XE
containing_templates:
- ACL_41
- ACL_42

Templates content:

ACL_41

ip access-list standard 41
10 permit {{acl_ip_address}} 0.0.0.255

ACL_42

ip access-list standard 42
10 permit {{acl_ip_address}} 0.0.0.255

Example-4: Day-N Template Assigned to a Switching Profile

Section titled “Example-4: Day-N Template Assigned to a Switching Profile”

Network profile template assignment demonstrating how to associate Day-N templates with switching network profiles for automated deployment across multiple sites.

catalyst_center:
design:
network_profiles:
switching:
- name: SDA SWITCH PROFILE
dayn_templates:
- ACL_COMPOSITE
sites:
- Global/United States/Golden Hills Campus/Sunset Tower
- Global/United States/Lakefront Tower/Windy City Plaza
- Global/United States/Oceanfront Mansion/Art Deco Mansion
- Global/United States/Desert Oasis Branch/Desert Oasis Tower

Example-5: Composite Day-N Template Deployed to a Device

Section titled “Example-5: Composite Day-N Template Deployed to a Device”

Device-specific template deployment showing how to deploy composite Day-N templates directly to individual devices with template-specific variable assignments.

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.com
device_ip: 192.168.30.64
serial_number: FOC2644021A
pid: C9300-24P
state: PROVISION
device_role: ACCESS
site: Global
template_device_association:
templates:
- name: ACL_COMPOSITE
project_name: PROJECT1
devices:
- name: EDGE01
variables:
type: local
values:
- name: acl_ip_address
value: 21.21.21.0
template_name: ACL_41
- name: acl_ip_address
value: 22.22.22.0
template_name: ACL_42
type: COMPOSITE

Example-6: Template Redeployment Strategies

Section titled “Example-6: Template Redeployment Strategies”

Template redeployment strategies demonstrating different approaches to template life-cycle management on network devices.

6a. Always redeploy template configuration regardless of content changes:

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.com
device_ip: 192.168.30.64
serial_number: FOC2644021A
pid: C9300-24P
state: PROVISION
device_role: ACCESS
site: Global
template_device_association:
templates:
- name: ACL_COMPOSITE
project_name: PROJECT1
devices:
- name: EDGE01
variables:
type: local
values:
- name: acl_ip_address
value: 21.21.21.0
template_name: ACL_41
- name: acl_ip_address
value: 22.22.22.0
template_name: ACL_42
state: ALWAYS
type: COMPOSITE

6b. Conditional template redeployment only when template content changes:

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.com
device_ip: 192.168.30.64
serial_number: FOC2644021A
pid: C9300-24P
state: PROVISION
device_role: ACCESS
site: Global
template_device_association:
templates:
- name: ACL_COMPOSITE
project_name: PROJECT1
devices:
- name: EDGE01
variables:
type: local
values:
- name: acl_ip_address
value: 21.21.21.0
template_name: ACL_41
- name: acl_ip_address
value: 22.22.22.0
template_name: ACL_42
state: ON_CHANGE
type: COMPOSITE

The redeploy_template flag can be applied both at the template level and at the device level:

When defined under a template, it controls how that specific template is redeployed across all devices that use it.

When defined under a device, it controls redeployment of all templates assigned to that device.

This lets you choose whether to consistently redeploy a single template to many devices, or redeploy every template on a specific device.

Example-7: Template-Level Redeployment After Content Changes

Section titled “Example-7: Template-Level Redeployment After Content Changes”

Template-level redeployment when the content of a template changes, affecting all devices that use this template.

catalyst_center:
cli_templates:
projects:
- name: Project_DayN
description: Project_DayN
dayn_templates:
- name: ACL_COMPOSITE
description: ACL COMPOSITE
language: JINJA
redeploy_template: ON_CHANGE
composite: true
device_types:
- product_family: Switches and Hubs
product_series: Cisco Catalyst 9300 Series Switches
software_type: IOS-XE
containing_templates:
- ACL_41
- ACL_42

Example-8: Device-Level Redeployment After Content Changes

Section titled “Example-8: Device-Level Redeployment After Content Changes”

Device-level redeployment when the content of a template changes, including both composite and regular templates.

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.com
device_ip: 192.168.30.64
serial_number: FOC2644021A
pid: C9300-24P
state: PROVISION
device_role: ACCESS
site: Global
template_device_association:
templates:
- name: ACL_BLOCK
project_name: PROJECT1
devices:
- name: EDGE01
variables:
type: local
values:
- name: interface
value: GigabtEthernet1/0/1
- name: ACL_COMPOSITE
project_name: PROJECT1
devices:
- name: EDGE01
variables:
type: local
values:
- name: acl_ip_address
value: 21.21.21.0
template_name: ACL_41
- name: acl_ip_address
value: 22.22.22.0
template_name: ACL_42
type: COMPOSITE

Example-9: Duplicate Template Names Using project#name Format

Section titled “Example-9: Duplicate Template Names Using project#name Format”

When the same template name exists under multiple template projects (e.g. bfd_interval in both PROJECT1 and PROJECT2), use the # delimiter to specify which project’s template to reference. The format is ProjectName#TemplateName.

9a. Template definition — two projects each containing a template with the same name (bfd_interval):

catalyst_center:
cli_templates:
projects:
- name: PROJECT1
dayn_templates:
- name: bfd_interval
description: add bfd interfval of 250 min_rx to Enterprise p2p ISIS interfaces
language: JINJA
device_types:
- product_family: Switches and Hubs
product_series: Cisco Catalyst 9000 Series Virtual Switches
software_type: IOS-XE
- name: PROJECT2
dayn_templates:
- name: bfd_interval
description: add bfd interfval of 350 min_rx to Service Provider p2p ISIS interfaces
language: JINJA
device_types:
- product_family: Switches and Hubs
product_series: Cisco Catalyst 9000 Series Virtual Switches
software_type: IOS-XE

Note: The template’s Jinja or Velocity file name must also be prefixed with the project name to avoid conflicts. For example, PROJECT1#bfd_interval.j2 and PROJECT2#bfd_interval.j2.

9b. Network profile : referencing a template that has a duplicate name across projects. Use ProjectName#TemplateName to specify the exact template:

catalyst_center:
design:
network_profiles:
switching:
- name: SDA SWITCH PROFILE
dayn_templates:
- PROJECT1#bfd_interval
sites:
- Global/Poland/Krakow

When the template name is unique across all projects, the project prefix is not required:

catalyst_center:
design:
network_profiles:
switching:
- name: SDA SWITCH PROFILE
dayn_templates:
- ACL_Block
sites:
- Global/Poland/Krakow

9c. Device provisioning: deploying templates with duplicate names to specific devices. In template_device_association, set project_name to the project that holds the template and name to the bare template name. Do not use ProjectName#TemplateName in name together with a different project_name: validation rejects it, and without validation nothing is deployed:

catalyst_center:
inventory:
devices:
- name: FIAB
fqdn_name: FIAB.cisco.eu
device_ip: 181.1.1.1
pid: C9KV-UADP-8P
state: PROVISION
device_role: ACCESS
site: Global/Poland/Krakow/Bld A
- name: LAN-EN2
fqdn_name: LAN-EN2.cisco.eu
device_ip: 181.1.1.43
pid: C9KV-UADP-8P
state: PROVISION
device_role: ACCESS
site: Global/Poland/Krakow/Bld A
template_device_association:
templates:
- name: bfd_interval
project_name: PROJECT2
devices:
- name: FIAB
state: ALWAYS
- name: LAN-EN2
state: ALWAYS

When the template name is unique across all projects, the project prefix is not required:

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.eu
device_ip: 198.18.130.1
pid: C9KV-UADP-8P
state: PROVISION
device_role: ACCESS
site: Global/Poland/Krakow/Bld A
template_device_association:
templates:
- name: ACL_43
project_name: PROJECT1
devices:
- name: EDGE01
variables:
type: local
values:
- name: acl_ip_address
value: 23.23.23.0

Example-10: Mixing Bare Name and ProjectName#TemplateName Formats

Section titled “Example-10: Mixing Bare Name and ProjectName#TemplateName Formats”

The project#name delimiter is only required when the same template name exists under multiple projects. All existing YAML without the prefix continues to work unchanged.

10a. Templates — ACL_Block is unique to PROJECT1, while Day_N_remove_bfd exists in both projects:

catalyst_center:
cli_templates:
projects:
- name: PROJECT1
dayn_templates:
- name: ACL_Block
description: ACL to block malicious IPs
device_types:
- product_family: Switches and Hubs
product_series: Cisco Catalyst 9000 Series Virtual Switches
software_type: IOS-XE
- name: Day_N_remove_bfd
description: Remove BFD from C9kv p2p ISIS interfaces
language: JINJA
device_types:
- product_family: Switches and Hubs
product_series: Cisco Catalyst 9000 Series Virtual Switches
software_type: IOS-XE
- name: PROJECT2
dayn_templates:
- name: Day_N_remove_bfd
description: Remove BFD from C9kv p2p ISIS interfaces
language: JINJA
device_types:
- product_family: Switches and Hubs
product_series: Cisco Catalyst 9000 Series Virtual Switches
software_type: IOS-XE

10b. Network profiles — ACL_Block is unique so bare name works (old format). Day_N_remove_bfd is duplicated so project#name is required (new format). Both formats coexist in the same list:

catalyst_center:
design:
network_profiles:
switching:
- name: SDA SWITCH PROFILE
dayn_templates:
- ACL_Block
- PROJECT2#Day_N_remove_bfd
sites:
- Global/Poland/Krakow

10c. Device provisioning — a single device deployed with both a duplicate-name template (Day_N_remove_bfd from PROJECT2, selected by project_name) and a unique template (ACL_Block):

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.eu
device_ip: 198.18.130.1
pid: C9KV-UADP-8P
state: PROVISION
device_role: ACCESS
site: Global/Poland/Krakow/Bld A
template_device_association:
templates:
- name: Day_N_remove_bfd
project_name: PROJECT2
devices:
- name: EDGE01
state: ALWAYS
- name: ACL_Block
project_name: PROJECT1
devices:
- name: EDGE01
variables:
type: local
values:
- name: management_interface
value: Loopback56

In summary — the project#name format is additive. Existing templates, network profiles, and device configurations that use unique template names require no changes.

Note: In switching network profiles, use ProjectName#TemplateName only for a name that exists in more than one project. A prefixed reference to a unique template does not resolve, and the plan fails with Must set a configuration value for the templates[...].template_id. The same happens to an existing prefixed reference when the same-name template in the other project is removed, so switch the reference back to the bare name in that change. Adding or removing a same-name template in another project also changes how the existing template is tracked by Terraform: it is deleted and recreated (new template ID and committed versions), and any deployment of it is redeployed.

Example-11: Template Variable with Binding and Selection Attributes

Section titled “Example-11: Template Variable with Binding and Selection Attributes”

Day-N template with a variable that binds to a Catalyst Center Common Settings data source.

catalyst_center:
cli_templates:
projects:
- name: BIND_SOURCE
dayn_templates:
- name: radius_server
description: RADIUS server configuration
language: JINJA
device_types:
- product_family: Switches and Hubs
product_series: Cisco Catalyst 9000 Series Virtual Switches
software_type: IOS-XE
variables:
- name: AAAEP
data_type: STRING
required: true
additional_info: AAA Endpoint Server IP Address
param_array: true
selection_type: SINGLE_SELECT
binding: '{"provider":"CommonSettings","source":"CommonSettings","entity":"aaa.endpoint.server","variableName":"__aaaendpointserver","attribute":"ipAddress","attributeToDisplay":"ipAddress","attributesAvailable":["ipAddress","protocol","encryptionScheme"],"params":[{"type":"SITE_UUID","scope":"RUNTIME","value":null},{"type":"MANAGED_DEVICE_UUID","scope":"RUNTIME","value":null}],"value":null,"errorMessage":null,"sortAttribute":null,"sortValues":null,"filterType":"contains","filterValue":"RADIUS","filterByAttribute":"protocol","filterSupported":true}'

Example-12: Deployment Timeout for Long-Running Day-N Templates

Section titled “Example-12: Deployment Timeout for Long-Running Day-N Templates”

After deploying a Day-N template, Terraform waits until Catalyst Center reports the deployment as SUCCESS or FAILURE. The wait is limited by deployment_timeout (in seconds, default 300). If the deployment is still running when the timeout expires, Terraform reports a Template Deployment Timeout warning and checks the result again on the next apply.

Raise the timeout for templates deployed to many devices or to devices behind slow WAN links. Set it per template, or for all templates under defaults.catalyst_center.templates.deployment_timeout. Changing it alone does not redeploy the template.

catalyst_center:
cli_templates:
projects:
- name: BRANCH_TEMPLATES
dayn_templates:
- name: BRANCH_ACCESS_PORTS
description: Access port configuration for all branch switches
language: JINJA
device_types:
- product_family: Switches and Hubs
software_type: IOS-XE
deployment_timeout: 900

Example-13: Secret Day-N Template Parameters

Section titled “Example-13: Secret Day-N Template Parameters”

Use a companion <parameter>_version_secure variable to keep a Day-N parameter out of ordinary deployment state and the exported model. The provider sends the value through a write-only attribute; its version remains in state. The current module requires Terraform 1.15 or later and Catalyst Center provider ~>0.6.6.

catalyst_center:
template_device_association:
templates:
- name: ConfigurePassword
project_name: Campus
unmanaged: true
state: ON_CHANGE
devices:
- name: BR10
variables:
type: local
values:
- name: description
value: Branch switch
- name: password
value: example-secret
- name: password_version_secure
value: '1'

Supply real secret values from your protected model input on every apply. description stays public. password is written without retaining its value in the deployment resource or exported model. The companion marker is not a controller template parameter. Existing state history and other copies are not retroactively erased.

Change the value and increase its companion version together. A value change alone cannot trigger deployment because write-only values are not retained for comparison. Versions are positive integers represented as strings in the model, such as '2'; a one-element string list also works. Rotation follows the association’s NEVER, ON_CHANGE, or ALWAYS policy. Removing the pair stops managing the parameter; it does not remove the password from the device.

Secret parameters can contain a list of strings. For a type: COMPOSITE association, put the same member template_name on both the parameter and its companion. Pairs are scoped to that member, so different members can use the same parameter name.

Shared values belong under the association’s variables. A device’s local or CSV variables replace that source; they are not merged with the shared list. Local validation checks inline pairs. CSV contents are resolved and checked by the Terraform module.

Only a paired _version_secure suffix opts a parameter into write-only handling. An unpaired suffix and ordinary names such as software_version remain public. Duplicate paired names, nonpositive versions, and chains such as password_version_secure_version_secure are rejected. These markers are Day-N deployment inputs, not template definitions or onboarding claim parameters.

See existing controller templates for unmanaged associations and Device provisioning for device lifecycle, PnP and fabric scenarios.

Templates define CLI configuration snippets using Jinja or Velocity templating languages that are pushed to network devices during provisioning. Templates belong to a Project and can target specific device families and software versions. They support parameterized variables, conditional logic, and can be tagged with Tags for organization. Applicable to both SDA fabric and non-fabric deployments.

Example-1: Day-N Jinja Template for Catalyst 9300 ACLs

Section titled “Example-1: Day-N Jinja Template for Catalyst 9300 ACLs”

Day-N template configuration for ongoing network management using Jinja templating to create access list templates targeting Catalyst 9300 series switches.

catalyst_center:
templates:
projects:
- name: Project_DayN
description: Project_DayN
dayn_templates:
- name: access_list_template
description: Access List Template
language: JINJA
composite: false
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9300 Series Switches"
software_type: IOS-XE

The content of the template must be stored in the templates/ directory inside a JINJA file, with the file name matching the template name:

access_list_template.j2

Terminal window
## Access List
ip access-list standard 20
10 permit 10.0.0.0 0.0.0.255
20 permit 20.0.0.0 0.0.0.255

Example-2: Onboarding Jinja Template for Catalyst 9300 Switches

Section titled “Example-2: Onboarding Jinja Template for Catalyst 9300 Switches”

Onboarding template configuration for initial device provisioning using Jinja templating to automate Day-0 configuration deployment on Catalyst 9300 series switches.

catalyst_center:
templates:
projects:
- name: Project_Onboarding
description: Project_Onboarding
onboarding_templates:
- name: onboarding_template
description: Onboarding Template
language: JINJA
composite: false
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9300 Series Switches"
software_type: IOS-XE

Example-3: Composite Template Combining Multiple ACL Templates

Section titled “Example-3: Composite Template Combining Multiple ACL Templates”

Composite template configuration combining multiple individual templates into a single deployable unit for complex ACL configurations targeting Catalyst 9300 series switches.

catalyst_center:
templates:
projects:
- name: Project_DayN
description: Project_DayN
dayn_templates:
- name: ACL_COMPOSITE
description: ACL COMPOSITE
language: JINJA
composite: true
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9300 Series Switches"
software_type: IOS-XE
containing_templates:
- ACL_41
- ACL_42

Templates content:

ACL_41

ip access-list standard 41
10 permit {{acl_ip_address}} 0.0.0.255

ACL_42

ip access-list standard 42
10 permit {{acl_ip_address}} 0.0.0.255

Example-4: Day-N Template Assigned to a Switching Profile

Section titled “Example-4: Day-N Template Assigned to a Switching Profile”

Network profile template assignment demonstrating how to associate Day-N templates with switching network profiles for automated deployment across multiple sites.

catalyst_center:
network_profiles:
switching:
- name: SDA SWITCH PROFILE
dayn_templates:
- ACL_COMPOSITE
sites:
- Global/United States/Golden Hills Campus/Sunset Tower
- Global/United States/Lakefront Tower/Windy City Plaza
- Global/United States/Oceanfront Mansion/Art Deco Mansion
- Global/United States/Desert Oasis Branch/Desert Oasis Tower

Example-5: Composite Day-N Template Deployed to a Device

Section titled “Example-5: Composite Day-N Template Deployed to a Device”

Device-specific template deployment showing how to deploy composite Day-N templates directly to individual devices with template-specific variable assignments.

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.com
device_ip: 192.168.30.64
serial_number: FOC2644021A
pid: C9300-24P
state: PROVISION
dayn_templates:
composite:
- name: ACL_COMPOSITE
variables:
- name: acl_ip_address
value: 21.21.21.0
template_name: ACL_41
- name: acl_ip_address
value: 22.22.22.0
template_name: ACL_42

Example-6: Template Redeployment Strategies

Section titled “Example-6: Template Redeployment Strategies”

Template redeployment strategies demonstrating different approaches to template life-cycle management on network devices.

6a. Always redeploy template configuration regardless of content changes:

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.com
device_ip: 192.168.30.64
serial_number: FOC2644021A
pid: C9300-24P
state: PROVISION
dayn_templates:
composite:
- name: ACL_COMPOSITE
redeploy_template: ALWAYS
variables:
- name: acl_ip_address
value: 21.21.21.0
template_name: ACL_41
- name: acl_ip_address
value: 22.22.22.0
template_name: ACL_42

6b. Conditional template redeployment only when template content changes:

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.com
device_ip: 192.168.30.64
serial_number: FOC2644021A
pid: C9300-24P
state: PROVISION
dayn_templates:
composite:
- name: ACL_COMPOSITE
redeploy_template: ON_CHANGE
variables:
- name: acl_ip_address
value: 21.21.21.0
template_name: ACL_41
- name: acl_ip_address
value: 22.22.22.0
template_name: ACL_42

The redeploy_template flag can be applied both at the template level and at the device level:

When defined under a template, it controls how that specific template is redeployed across all devices that use it.

When defined under a device, it controls redeployment of all templates assigned to that device.

This lets you choose whether to consistently redeploy a single template to many devices, or redeploy every template on a specific device.

Example-7: Template-Level Redeployment After Content Changes

Section titled “Example-7: Template-Level Redeployment After Content Changes”

Template-level redeployment when the content of a template changes, affecting all devices that use this template.

catalyst_center:
templates:
projects:
- name: Project_DayN
description: Project_DayN
dayn_templates:
- name: ACL_COMPOSITE
description: ACL COMPOSITE
language: JINJA
redeploy_template: ON_CHANGE
composite: true
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9300 Series Switches"
software_type: IOS-XE
containing_templates:
- ACL_41
- ACL_42

Example-8: Device-Level Redeployment After Content Changes

Section titled “Example-8: Device-Level Redeployment After Content Changes”

Device-level redeployment when the content of a template changes, including both composite and regular templates.

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.com
device_ip: 192.168.30.64
serial_number: FOC2644021A
pid: C9300-24P
state: PROVISION
dayn_templates:
redeploy_template: ON_CHANGE
composite:
- name: ACL_COMPOSITE
variables:
- name: acl_ip_address
value: 21.21.21.0
template_name: ACL_41
- name: acl_ip_address
value: 22.22.22.0
template_name: ACL_42
regular:
- name: ACL_BLOCK
variables:
- name: interface
value: GigabtEthernet1/0/1

Example-9: Duplicate Template Names Using project#name Format

Section titled “Example-9: Duplicate Template Names Using project#name Format”

When the same template name exists under multiple template projects (e.g. bfd_interval in both PROJECT1 and PROJECT2), use the # delimiter to specify which project’s template to reference. The format is ProjectName#TemplateName.

9a. Template definition — two projects each containing a template with the same name (bfd_interval):

catalyst_center:
templates:
projects:
- name: PROJECT1
dayn_templates:
- name: bfd_interval
description: add bfd interfval of 250 min_rx to Enterprise p2p ISIS interfaces
language: JINJA
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9000 Series Virtual Switches"
software_type: IOS-XE
- name: PROJECT2
dayn_templates:
- name: bfd_interval
description: add bfd interfval of 350 min_rx to Service Provider p2p ISIS interfaces
language: JINJA
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9000 Series Virtual Switches"
software_type: IOS-XE

Note: The template’s Jinja or Velocity file name must also be prefixed with the project name to avoid conflicts. For example, PROJECT1#bfd_interval.j2 and PROJECT2#bfd_interval.j2.

9b. Network profile : referencing a template that has a duplicate name across projects. Use ProjectName#TemplateName to specify the exact template:

catalyst_center:
network_profiles:
switching:
- name: SDA SWITCH PROFILE
dayn_templates:
- PROJECT1#bfd_interval
sites:
- Global/Poland/Krakow

When the template name is unique across all projects, the project prefix is not required:

catalyst_center:
network_profiles:
switching:
- name: SDA SWITCH PROFILE
dayn_templates:
- ACL_Block
sites:
- Global/Poland/Krakow

9c. Device provisioning: deploying templates with duplicate names to specific devices. Use ProjectName#TemplateName in the name field:

catalyst_center:
inventory:
devices:
- name: FIAB
fqdn_name: FIAB.cisco.eu
device_ip: 181.1.1.1
pid: C9KV-UADP-8P
state: PROVISION
device_role: ACCESS
site: Global/Poland/Krakow/Bld A
dayn_templates:
composite:
- name: PROJECT2#bfd_interval
redeploy_template: ALWAYS
- name: LAN-EN2
fqdn_name: LAN-EN2.cisco.eu
device_ip: 181.1.1.43
pid: C9KV-UADP-8P
state: PROVISION
device_role: ACCESS
site: Global/Poland/Krakow/Bld A
dayn_templates:
composite:
- name: PROJECT2#bfd_interval
redeploy_template: ALWAYS

When the template name is unique across all projects, the project prefix is not required:

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.eu
device_ip: 198.18.130.1
pid: C9KV-UADP-8P
state: PROVISION
device_role: ACCESS
site: Global/Poland/Krakow/Bld A
dayn_templates:
regular:
- name: ACL_43
variables:
- name: acl_ip_address
value: 23.23.23.0

Example-10: Mixing Bare Name and ProjectName#TemplateName Formats

Section titled “Example-10: Mixing Bare Name and ProjectName#TemplateName Formats”

The project#name delimiter is only required when the same template name exists under multiple projects. All existing YAML without the prefix continues to work unchanged.

10a. Templates — ACL_Block is unique to PROJECT1, while Day_N_remove_bfd exists in both projects:

catalyst_center:
templates:
projects:
- name: PROJECT1
dayn_templates:
- name: ACL_Block
description: ACL to block malicious IPs
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9000 Series Virtual Switches"
software_type: IOS-XE
- name: Day_N_remove_bfd
description: Remove BFD from C9kv p2p ISIS interfaces
language: JINJA
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9000 Series Virtual Switches"
software_type: IOS-XE
- name: PROJECT2
dayn_templates:
- name: Day_N_remove_bfd
description: Remove BFD from C9kv p2p ISIS interfaces
language: JINJA
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9000 Series Virtual Switches"
software_type: IOS-XE

10b. Network profiles — ACL_Block is unique so bare name works (old format). Day_N_remove_bfd is duplicated so project#name is required (new format). Both formats coexist in the same list:

catalyst_center:
network_profiles:
switching:
- name: SDA SWITCH PROFILE
dayn_templates:
- ACL_Block
- PROJECT2#Day_N_remove_bfd
sites:
- Global/Poland/Krakow

10c. Device provisioning — a single device deployed with both a duplicate-name template (PROJECT2#Day_N_remove_bfd, new format) and a unique template (ACL_Block, old format):

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.eu
device_ip: 198.18.130.1
pid: C9KV-UADP-8P
state: PROVISION
device_role: ACCESS
site: Global/Poland/Krakow/Bld A
dayn_templates:
regular:
- name: PROJECT2#Day_N_remove_bfd
redeploy_template: ALWAYS
- name: ACL_Block
variables:
- name: management_interface
value: Loopback56

In summary — the project#name format is additive. Existing templates, network profiles, and device configurations that use unique template names require no changes.

Note: Using project#name for a template that is unique across projects is also valid and will not break anything. For example, if ACL_Block only exists under PROJECT1, both ACL_Block and PROJECT1#ACL_Block resolve to the same template. The project prefix is only required for duplicate names, but it is accepted for all templates.

Example-11: Template Variable with Binding and Selection Attributes

Section titled “Example-11: Template Variable with Binding and Selection Attributes”

Day-N template with a variable that binds to a Catalyst Center Common Settings data source.

catalyst_center:
templates:
projects:
- name: BIND_SOURCE
dayn_templates:
- name: radius_server
description: RADIUS server configuration
language: JINJA
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9000 Series Virtual Switches"
software_type: IOS-XE
variables:
- name: AAAEP
data_type: STRING
required: true
additional_info: AAA Endpoint Server IP Address
param_array: true
selection_type: SINGLE_SELECT
binding: '{"provider":"CommonSettings","source":"CommonSettings","entity":"aaa.endpoint.server","variableName":"__aaaendpointserver","attribute":"ipAddress","attributeToDisplay":"ipAddress","attributesAvailable":["ipAddress","protocol","encryptionScheme"],"params":[{"type":"SITE_UUID","scope":"RUNTIME","value":null},{"type":"MANAGED_DEVICE_UUID","scope":"RUNTIME","value":null}],"value":null,"errorMessage":null,"sortAttribute":null,"sortValues":null,"filterType":"contains","filterValue":"RADIUS","filterByAttribute":"protocol","filterSupported":true}'

Example-12: Deployment Timeout for Long-Running Day-N Templates

Section titled “Example-12: Deployment Timeout for Long-Running Day-N Templates”

After deploying a Day-N template, Terraform waits until Catalyst Center reports the deployment as SUCCESS or FAILURE. The wait is limited by deployment_timeout (in seconds, default 300). If the deployment is still running when the timeout expires, Terraform reports a Template Deployment Timeout warning and checks the result again on the next apply.

Raise the timeout for templates deployed to many devices or to devices behind slow WAN links. Set it per template, or for all templates under defaults.catalyst_center.templates.deployment_timeout. Changing it alone does not redeploy the template.

catalyst_center:
templates:
projects:
- name: BRANCH_TEMPLATES
dayn_templates:
- name: BRANCH_ACCESS_PORTS
description: Access port configuration for all branch switches
language: JINJA
device_types:
- product_family: "Switches and Hubs"
software_type: IOS-XE
deployment_timeout: 900

Example-13: Secret Day-N Template Parameters

Section titled “Example-13: Secret Day-N Template Parameters”

Day-N template variables are ordinary model values. When a variable carries a password, a key, or any other credential, mark it as a secret so that its value is not kept once it has been deployed.

To mark a variable, add a companion variable beside it whose name is the parameter name followed by _version_secure, with a positive integer value:

catalyst_center:
inventory:
devices:
- name: BR10
device_role: ACCESS
state: PROVISION
site: Global/Test
dayn_templates:
regular:
- name: ConfigurePassword
redeploy_template: ON_CHANGE
variables:
- name: description
value: Branch switch
- name: password
value: example-secret
- name: password_version_secure
value: 1

Reference the template by its unique name, or as <project_name>#<template_name> for a template that already exists in Catalyst Center.

In this example description stays an ordinary parameter. password becomes a secret: its value is sent to Catalyst Center when the template is deployed and is not retained afterwards. The password_version_secure marker is never sent to Catalyst Center at all — it only records which generation of the secret is currently deployed.

Because secret values are not retained, supply them on every apply. Whenever a change triggers a deployment, every secret belonging to that device is sent again.

Marking a parameter as a secret changes how it is handled from that point onward. It does not retroactively remove a value that was already recorded elsewhere while the parameter was still an ordinary one.

Changing only the value of a secret does not deploy anything. Raise the companion version as well:

variables:
- name: password
value: new-secret
- name: password_version_secure
value: 2

A version change is treated like any other change, so it follows the template’s NEVER, ON_CHANGE, or ALWAYS redeployment policy as described in Example-6.

Removing both variables stops managing that secret. It does not remove the password from the device.

Parameters that take a list of values use the same convention. In composite templates, set template_name on both the value and its version so that the two are paired with the same member template:

variables:
- template_name: ConfigurePassword
name: password
value: example-secret
- template_name: ConfigurePassword
name: password_version_secure
value: 2

Pairing is scoped to a single device, deployment template, and composite member, so the same parameter name can appear under several members without the pairs interfering. This works for composite templates defined in the data model and for composite templates that already exist in Catalyst Center.

Only the exact suffix _version_secure marks a secret. Ordinary names such as software and software_version stay public even when both are present, and a _version_secure variable with no matching base parameter is an ordinary parameter.

Chains such as password, password_version_secure, and password_version_secure_version_secure are ambiguous and are rejected.

Companion versions belong to the Day-N variables set on a device. They have no meaning in template parameter definitions or in onboarding claim parameters.

The examples above cover how to define templates and reference them from network profiles and devices. Additional template-consumption and provisioning scenarios are documented on the Device page. Check there for scenarios not covered here, including:

  • Deploying a Built-in or Pre-existing CLI Template — reference regular, composite, and onboarding templates that already exist in Catalyst Center (built-in or created outside Terraform) via the <project_name>#<template_name> form, without redefining them here.

Templates define CLI configuration snippets using Jinja or Velocity templating languages that are pushed to network devices during provisioning. Templates belong to a Project and can target specific device families and software versions. They support parameterized variables, conditional logic, and can be tagged with Tags for organization. Applicable to both SDA fabric and non-fabric deployments.

Example-1: Day-N Jinja Template for Catalyst 9300 ACLs

Section titled “Example-1: Day-N Jinja Template for Catalyst 9300 ACLs”

Day-N template configuration for ongoing network management using Jinja templating to create access list templates targeting Catalyst 9300 series switches.

catalyst_center:
templates:
projects:
- name: Project_DayN
description: Project_DayN
dayn_templates:
- name: access_list_template
description: Access List Template
language: JINJA
composite: false
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9300 Series Switches"
software_type: IOS-XE

The content of the template must be stored in the templates/ directory inside a JINJA file, with the file name matching the template name:

access_list_template.j2

Terminal window
## Access List
ip access-list standard 20
10 permit 10.0.0.0 0.0.0.255
20 permit 20.0.0.0 0.0.0.255

Example-2: Onboarding Jinja Template for Catalyst 9300 Switches

Section titled “Example-2: Onboarding Jinja Template for Catalyst 9300 Switches”

Onboarding template configuration for initial device provisioning using Jinja templating to automate Day-0 configuration deployment on Catalyst 9300 series switches.

catalyst_center:
templates:
projects:
- name: Project_Onboarding
description: Project_Onboarding
onboarding_templates:
- name: onboarding_template
description: Onboarding Template
language: JINJA
composite: false
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9300 Series Switches"
software_type: IOS-XE

Example-3: Composite Template Combining Multiple ACL Templates

Section titled “Example-3: Composite Template Combining Multiple ACL Templates”

Composite template configuration combining multiple individual templates into a single deployable unit for complex ACL configurations targeting Catalyst 9300 series switches.

catalyst_center:
templates:
projects:
- name: Project_DayN
description: Project_DayN
dayn_templates:
- name: ACL_COMPOSITE
description: ACL COMPOSITE
language: JINJA
composite: true
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9300 Series Switches"
software_type: IOS-XE
containing_templates:
- ACL_41
- ACL_42

Templates content:

ACL_41

ip access-list standard 41
10 permit {{acl_ip_address}} 0.0.0.255

ACL_42

ip access-list standard 42
10 permit {{acl_ip_address}} 0.0.0.255

Example-4: Day-N Template Assigned to a Switching Profile

Section titled “Example-4: Day-N Template Assigned to a Switching Profile”

Network profile template assignment demonstrating how to associate Day-N templates with switching network profiles for automated deployment across multiple sites.

catalyst_center:
network_profiles:
switching:
- name: SDA SWITCH PROFILE
dayn_templates:
- ACL_COMPOSITE
sites:
- Global/United States/Golden Hills Campus/Sunset Tower
- Global/United States/Lakefront Tower/Windy City Plaza
- Global/United States/Oceanfront Mansion/Art Deco Mansion
- Global/United States/Desert Oasis Branch/Desert Oasis Tower

Example-5: Composite Day-N Template Deployed to a Device

Section titled “Example-5: Composite Day-N Template Deployed to a Device”

Device-specific template deployment showing how to deploy composite Day-N templates directly to individual devices with template-specific variable assignments.

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.com
device_ip: 192.168.30.64
serial_number: FOC2644021A
pid: C9300-24P
state: PROVISION
dayn_templates:
composite:
- name: ACL_COMPOSITE
variables:
- name: acl_ip_address
value: 21.21.21.0
template_name: ACL_41
- name: acl_ip_address
value: 22.22.22.0
template_name: ACL_42

Example-6: Template Redeployment Strategies

Section titled “Example-6: Template Redeployment Strategies”

Template redeployment strategies demonstrating different approaches to template life-cycle management on network devices.

6a. Always redeploy template configuration regardless of content changes:

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.com
device_ip: 192.168.30.64
serial_number: FOC2644021A
pid: C9300-24P
state: PROVISION
dayn_templates:
composite:
- name: ACL_COMPOSITE
redeploy_template: ALWAYS
variables:
- name: acl_ip_address
value: 21.21.21.0
template_name: ACL_41
- name: acl_ip_address
value: 22.22.22.0
template_name: ACL_42

6b. Conditional template redeployment only when template content changes:

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.com
device_ip: 192.168.30.64
serial_number: FOC2644021A
pid: C9300-24P
state: PROVISION
dayn_templates:
composite:
- name: ACL_COMPOSITE
redeploy_template: ON_CHANGE
variables:
- name: acl_ip_address
value: 21.21.21.0
template_name: ACL_41
- name: acl_ip_address
value: 22.22.22.0
template_name: ACL_42

The redeploy_template flag can be applied both at the template level and at the device level:

When defined under a template, it controls how that specific template is redeployed across all devices that use it.

When defined under a device, it controls redeployment of all templates assigned to that device.

This lets you choose whether to consistently redeploy a single template to many devices, or redeploy every template on a specific device.

Example-7: Template-Level Redeployment After Content Changes

Section titled “Example-7: Template-Level Redeployment After Content Changes”

Template-level redeployment when the content of a template changes, affecting all devices that use this template.

catalyst_center:
templates:
projects:
- name: Project_DayN
description: Project_DayN
dayn_templates:
- name: ACL_COMPOSITE
description: ACL COMPOSITE
language: JINJA
redeploy_template: ON_CHANGE
composite: true
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9300 Series Switches"
software_type: IOS-XE
containing_templates:
- ACL_41
- ACL_42

Example-8: Device-Level Redeployment After Content Changes

Section titled “Example-8: Device-Level Redeployment After Content Changes”

Device-level redeployment when the content of a template changes, including both composite and regular templates.

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.com
device_ip: 192.168.30.64
serial_number: FOC2644021A
pid: C9300-24P
state: PROVISION
dayn_templates:
redeploy_template: ON_CHANGE
composite:
- name: ACL_COMPOSITE
variables:
- name: acl_ip_address
value: 21.21.21.0
template_name: ACL_41
- name: acl_ip_address
value: 22.22.22.0
template_name: ACL_42
regular:
- name: ACL_BLOCK
variables:
- name: interface
value: GigabtEthernet1/0/1

Example-9: Duplicate Template Names Using project#name Format

Section titled “Example-9: Duplicate Template Names Using project#name Format”

When the same template name exists under multiple template projects (e.g. bfd_interval in both PROJECT1 and PROJECT2), use the # delimiter to specify which project’s template to reference. The format is ProjectName#TemplateName.

9a. Template definition — two projects each containing a template with the same name (bfd_interval):

catalyst_center:
templates:
projects:
- name: PROJECT1
dayn_templates:
- name: bfd_interval
description: add bfd interfval of 250 min_rx to Enterprise p2p ISIS interfaces
language: JINJA
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9000 Series Virtual Switches"
software_type: IOS-XE
- name: PROJECT2
dayn_templates:
- name: bfd_interval
description: add bfd interfval of 350 min_rx to Service Provider p2p ISIS interfaces
language: JINJA
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9000 Series Virtual Switches"
software_type: IOS-XE

Note: The template’s Jinja or Velocity file name must also be prefixed with the project name to avoid conflicts. For example, PROJECT1#bfd_interval.j2 and PROJECT2#bfd_interval.j2.

9b. Network profile : referencing a template that has a duplicate name across projects. Use ProjectName#TemplateName to specify the exact template:

catalyst_center:
network_profiles:
switching:
- name: SDA SWITCH PROFILE
dayn_templates:
- PROJECT1#bfd_interval
sites:
- Global/Poland/Krakow

When the template name is unique across all projects, the project prefix is not required:

catalyst_center:
network_profiles:
switching:
- name: SDA SWITCH PROFILE
dayn_templates:
- ACL_Block
sites:
- Global/Poland/Krakow

9c. Device provisioning: deploying templates with duplicate names to specific devices. Use ProjectName#TemplateName in the name field:

catalyst_center:
inventory:
devices:
- name: FIAB
fqdn_name: FIAB.cisco.eu
device_ip: 181.1.1.1
pid: C9KV-UADP-8P
state: PROVISION
device_role: ACCESS
site: Global/Poland/Krakow/Bld A
dayn_templates:
composite:
- name: PROJECT2#bfd_interval
redeploy_template: ALWAYS
- name: LAN-EN2
fqdn_name: LAN-EN2.cisco.eu
device_ip: 181.1.1.43
pid: C9KV-UADP-8P
state: PROVISION
device_role: ACCESS
site: Global/Poland/Krakow/Bld A
dayn_templates:
composite:
- name: PROJECT2#bfd_interval
redeploy_template: ALWAYS

When the template name is unique across all projects, the project prefix is not required:

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.eu
device_ip: 198.18.130.1
pid: C9KV-UADP-8P
state: PROVISION
device_role: ACCESS
site: Global/Poland/Krakow/Bld A
dayn_templates:
regular:
- name: ACL_43
variables:
- name: acl_ip_address
value: 23.23.23.0

Example-10: Mixing Bare Name and ProjectName#TemplateName Formats

Section titled “Example-10: Mixing Bare Name and ProjectName#TemplateName Formats”

The project#name delimiter is only required when the same template name exists under multiple projects. All existing YAML without the prefix continues to work unchanged.

10a. Templates — ACL_Block is unique to PROJECT1, while Day_N_remove_bfd exists in both projects:

catalyst_center:
templates:
projects:
- name: PROJECT1
dayn_templates:
- name: ACL_Block
description: ACL to block malicious IPs
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9000 Series Virtual Switches"
software_type: IOS-XE
- name: Day_N_remove_bfd
description: Remove BFD from C9kv p2p ISIS interfaces
language: JINJA
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9000 Series Virtual Switches"
software_type: IOS-XE
- name: PROJECT2
dayn_templates:
- name: Day_N_remove_bfd
description: Remove BFD from C9kv p2p ISIS interfaces
language: JINJA
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9000 Series Virtual Switches"
software_type: IOS-XE

10b. Network profiles — ACL_Block is unique so bare name works (old format). Day_N_remove_bfd is duplicated so project#name is required (new format). Both formats coexist in the same list:

catalyst_center:
network_profiles:
switching:
- name: SDA SWITCH PROFILE
dayn_templates:
- ACL_Block
- PROJECT2#Day_N_remove_bfd
sites:
- Global/Poland/Krakow

10c. Device provisioning — a single device deployed with both a duplicate-name template (PROJECT2#Day_N_remove_bfd, new format) and a unique template (ACL_Block, old format):

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.eu
device_ip: 198.18.130.1
pid: C9KV-UADP-8P
state: PROVISION
device_role: ACCESS
site: Global/Poland/Krakow/Bld A
dayn_templates:
regular:
- name: PROJECT2#Day_N_remove_bfd
redeploy_template: ALWAYS
- name: ACL_Block
variables:
- name: management_interface
value: Loopback56

In summary — the project#name format is additive. Existing templates, network profiles, and device configurations that use unique template names require no changes.

Note: Using project#name for a template that is unique across projects is also valid and will not break anything. For example, if ACL_Block only exists under PROJECT1, both ACL_Block and PROJECT1#ACL_Block resolve to the same template. The project prefix is only required for duplicate names, but it is accepted for all templates.

Example-11: Template Variable with Binding and Selection Attributes

Section titled “Example-11: Template Variable with Binding and Selection Attributes”

Day-N template with a variable that binds to a Catalyst Center Common Settings data source.

catalyst_center:
templates:
projects:
- name: BIND_SOURCE
dayn_templates:
- name: radius_server
description: RADIUS server configuration
language: JINJA
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9000 Series Virtual Switches"
software_type: IOS-XE
variables:
- name: AAAEP
data_type: STRING
required: true
additional_info: AAA Endpoint Server IP Address
param_array: true
selection_type: SINGLE_SELECT
binding: '{"provider":"CommonSettings","source":"CommonSettings","entity":"aaa.endpoint.server","variableName":"__aaaendpointserver","attribute":"ipAddress","attributeToDisplay":"ipAddress","attributesAvailable":["ipAddress","protocol","encryptionScheme"],"params":[{"type":"SITE_UUID","scope":"RUNTIME","value":null},{"type":"MANAGED_DEVICE_UUID","scope":"RUNTIME","value":null}],"value":null,"errorMessage":null,"sortAttribute":null,"sortValues":null,"filterType":"contains","filterValue":"RADIUS","filterByAttribute":"protocol","filterSupported":true}'

Example-12: Deployment Timeout for Long-Running Day-N Templates

Section titled “Example-12: Deployment Timeout for Long-Running Day-N Templates”

After deploying a Day-N template, Terraform waits until Catalyst Center reports the deployment as SUCCESS or FAILURE. The wait is limited by deployment_timeout (in seconds, default 300). If the deployment is still running when the timeout expires, Terraform reports a Template Deployment Timeout warning and checks the result again on the next apply.

Raise the timeout for templates deployed to many devices or to devices behind slow WAN links. Set it per template, or for all templates under defaults.catalyst_center.templates.deployment_timeout. Changing it alone does not redeploy the template.

catalyst_center:
templates:
projects:
- name: BRANCH_TEMPLATES
dayn_templates:
- name: BRANCH_ACCESS_PORTS
description: Access port configuration for all branch switches
language: JINJA
device_types:
- product_family: "Switches and Hubs"
software_type: IOS-XE
deployment_timeout: 900

Example-13: Secret Day-N Template Parameters

Section titled “Example-13: Secret Day-N Template Parameters”

Day-N template variables are ordinary model values. When a variable carries a password, a key, or any other credential, mark it as a secret so that its value is not kept once it has been deployed.

To mark a variable, add a companion variable beside it whose name is the parameter name followed by _version_secure, with a positive integer value:

catalyst_center:
inventory:
devices:
- name: BR10
device_role: ACCESS
state: PROVISION
site: Global/Test
dayn_templates:
regular:
- name: ConfigurePassword
redeploy_template: ON_CHANGE
variables:
- name: description
value: Branch switch
- name: password
value: example-secret
- name: password_version_secure
value: 1

Reference the template by its unique name, or as <project_name>#<template_name> for a template that already exists in Catalyst Center.

In this example description stays an ordinary parameter. password becomes a secret: its value is sent to Catalyst Center when the template is deployed and is not retained afterwards. The password_version_secure marker is never sent to Catalyst Center at all — it only records which generation of the secret is currently deployed.

Because secret values are not retained, supply them on every apply. Whenever a change triggers a deployment, every secret belonging to that device is sent again.

Marking a parameter as a secret changes how it is handled from that point onward. It does not retroactively remove a value that was already recorded elsewhere while the parameter was still an ordinary one.

Changing only the value of a secret does not deploy anything. Raise the companion version as well:

variables:
- name: password
value: new-secret
- name: password_version_secure
value: 2

A version change is treated like any other change, so it follows the template’s NEVER, ON_CHANGE, or ALWAYS redeployment policy as described in Example-6.

Removing both variables stops managing that secret. It does not remove the password from the device.

Parameters that take a list of values use the same convention. In composite templates, set template_name on both the value and its version so that the two are paired with the same member template:

variables:
- template_name: ConfigurePassword
name: password
value: example-secret
- template_name: ConfigurePassword
name: password_version_secure
value: 2

Pairing is scoped to a single device, deployment template, and composite member, so the same parameter name can appear under several members without the pairs interfering. This works for composite templates defined in the data model and for composite templates that already exist in Catalyst Center.

Only the exact suffix _version_secure marks a secret. Ordinary names such as software and software_version stay public even when both are present, and a _version_secure variable with no matching base parameter is an ordinary parameter.

Chains such as password, password_version_secure, and password_version_secure_version_secure are ambiguous and are rejected.

Companion versions belong to the Day-N variables set on a device. They have no meaning in template parameter definitions or in onboarding claim parameters.

The examples above cover how to define templates and reference them from network profiles and devices. Additional template-consumption and provisioning scenarios are documented on the Device page. Check there for scenarios not covered here, including:

  • Deploying a Built-in or Pre-existing CLI Template — reference regular, composite, and onboarding templates that already exist in Catalyst Center (built-in or created outside Terraform) via the <project_name>#<template_name> form, without redefining them here.

Templates define CLI configuration snippets using Jinja or Velocity templating languages that are pushed to network devices during provisioning. Templates belong to a Project and can target specific device families and software versions. They support parameterized variables, conditional logic, and can be tagged with Tags for organization. Applicable to both SDA fabric and non-fabric deployments.

Example-1: Day-N Jinja Template for Catalyst 9300 ACLs

Section titled “Example-1: Day-N Jinja Template for Catalyst 9300 ACLs”

Day-N template configuration for ongoing network management using Jinja templating to create access list templates targeting Catalyst 9300 series switches.

catalyst_center:
templates:
projects:
- name: Project_DayN
description: Project_DayN
dayn_templates:
- name: access_list_template
description: Access List Template
language: JINJA
composite: false
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9300 Series Switches"
software_type: IOS-XE

The content of the template must be stored in the templates/ directory inside a JINJA file, with the file name matching the template name:

access_list_template.j2

Terminal window
## Access List
ip access-list standard 20
10 permit 10.0.0.0 0.0.0.255
20 permit 20.0.0.0 0.0.0.255

Example-2: Onboarding Jinja Template for Catalyst 9300 Switches

Section titled “Example-2: Onboarding Jinja Template for Catalyst 9300 Switches”

Onboarding template configuration for initial device provisioning using Jinja templating to automate Day-0 configuration deployment on Catalyst 9300 series switches.

catalyst_center:
templates:
projects:
- name: Project_Onboarding
description: Project_Onboarding
onboarding_templates:
- name: onboarding_template
description: Onboarding Template
language: JINJA
composite: false
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9300 Series Switches"
software_type: IOS-XE

Example-3: Composite Template Combining Multiple ACL Templates

Section titled “Example-3: Composite Template Combining Multiple ACL Templates”

Composite template configuration combining multiple individual templates into a single deployable unit for complex ACL configurations targeting Catalyst 9300 series switches.

catalyst_center:
templates:
projects:
- name: Project_DayN
description: Project_DayN
dayn_templates:
- name: ACL_COMPOSITE
description: ACL COMPOSITE
language: JINJA
composite: true
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9300 Series Switches"
software_type: IOS-XE
containing_templates:
- ACL_41
- ACL_42

Templates content:

ACL_41

ip access-list standard 41
10 permit {{acl_ip_address}} 0.0.0.255

ACL_42

ip access-list standard 42
10 permit {{acl_ip_address}} 0.0.0.255

Example-4: Day-N Template Assigned to a Switching Profile

Section titled “Example-4: Day-N Template Assigned to a Switching Profile”

Network profile template assignment demonstrating how to associate Day-N templates with switching network profiles for automated deployment across multiple sites.

catalyst_center:
network_profiles:
switching:
- name: SDA SWITCH PROFILE
dayn_templates:
- ACL_COMPOSITE
sites:
- Global/United States/Golden Hills Campus/Sunset Tower
- Global/United States/Lakefront Tower/Windy City Plaza
- Global/United States/Oceanfront Mansion/Art Deco Mansion
- Global/United States/Desert Oasis Branch/Desert Oasis Tower

Example-5: Composite Day-N Template Deployed to a Device

Section titled “Example-5: Composite Day-N Template Deployed to a Device”

Device-specific template deployment showing how to deploy composite Day-N templates directly to individual devices with template-specific variable assignments.

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.com
device_ip: 192.168.30.64
serial_number: FOC2644021A
pid: C9300-24P
state: PROVISION
dayn_templates:
composite:
- name: ACL_COMPOSITE
variables:
- name: acl_ip_address
value: 21.21.21.0
template_name: ACL_41
- name: acl_ip_address
value: 22.22.22.0
template_name: ACL_42

Example-6: Template Redeployment Strategies

Section titled “Example-6: Template Redeployment Strategies”

Template redeployment strategies demonstrating different approaches to template life-cycle management on network devices.

6a. Always redeploy template configuration regardless of content changes:

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.com
device_ip: 192.168.30.64
serial_number: FOC2644021A
pid: C9300-24P
state: PROVISION
dayn_templates:
composite:
- name: ACL_COMPOSITE
redeploy_template: ALWAYS
variables:
- name: acl_ip_address
value: 21.21.21.0
template_name: ACL_41
- name: acl_ip_address
value: 22.22.22.0
template_name: ACL_42

6b. Conditional template redeployment only when template content changes:

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.com
device_ip: 192.168.30.64
serial_number: FOC2644021A
pid: C9300-24P
state: PROVISION
dayn_templates:
composite:
- name: ACL_COMPOSITE
redeploy_template: ON_CHANGE
variables:
- name: acl_ip_address
value: 21.21.21.0
template_name: ACL_41
- name: acl_ip_address
value: 22.22.22.0
template_name: ACL_42

The redeploy_template flag can be applied both at the template level and at the device level:

When defined under a template, it controls how that specific template is redeployed across all devices that use it.

When defined under a device, it controls redeployment of all templates assigned to that device.

This lets you choose whether to consistently redeploy a single template to many devices, or redeploy every template on a specific device.

Example-7: Template-Level Redeployment After Content Changes

Section titled “Example-7: Template-Level Redeployment After Content Changes”

Template-level redeployment when the content of a template changes, affecting all devices that use this template.

catalyst_center:
templates:
projects:
- name: Project_DayN
description: Project_DayN
dayn_templates:
- name: ACL_COMPOSITE
description: ACL COMPOSITE
language: JINJA
redeploy_template: ON_CHANGE
composite: true
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9300 Series Switches"
software_type: IOS-XE
containing_templates:
- ACL_41
- ACL_42

Example-8: Device-Level Redeployment After Content Changes

Section titled “Example-8: Device-Level Redeployment After Content Changes”

Device-level redeployment when the content of a template changes, including both composite and regular templates.

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.com
device_ip: 192.168.30.64
serial_number: FOC2644021A
pid: C9300-24P
state: PROVISION
dayn_templates:
redeploy_template: ON_CHANGE
composite:
- name: ACL_COMPOSITE
variables:
- name: acl_ip_address
value: 21.21.21.0
template_name: ACL_41
- name: acl_ip_address
value: 22.22.22.0
template_name: ACL_42
regular:
- name: ACL_BLOCK
variables:
- name: interface
value: GigabtEthernet1/0/1

Example-9: Duplicate Template Names Using project#name Format

Section titled “Example-9: Duplicate Template Names Using project#name Format”

When the same template name exists under multiple template projects (e.g. bfd_interval in both PROJECT1 and PROJECT2), use the # delimiter to specify which project’s template to reference. The format is ProjectName#TemplateName.

9a. Template definition — two projects each containing a template with the same name (bfd_interval):

catalyst_center:
templates:
projects:
- name: PROJECT1
dayn_templates:
- name: bfd_interval
description: add bfd interfval of 250 min_rx to Enterprise p2p ISIS interfaces
language: JINJA
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9000 Series Virtual Switches"
software_type: IOS-XE
- name: PROJECT2
dayn_templates:
- name: bfd_interval
description: add bfd interfval of 350 min_rx to Service Provider p2p ISIS interfaces
language: JINJA
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9000 Series Virtual Switches"
software_type: IOS-XE

Note: The template’s Jinja or Velocity file name must also be prefixed with the project name to avoid conflicts. For example, PROJECT1#bfd_interval.j2 and PROJECT2#bfd_interval.j2.

9b. Network profile : referencing a template that has a duplicate name across projects. Use ProjectName#TemplateName to specify the exact template:

catalyst_center:
network_profiles:
switching:
- name: SDA SWITCH PROFILE
dayn_templates:
- PROJECT1#bfd_interval
sites:
- Global/Poland/Krakow

When the template name is unique across all projects, the project prefix is not required:

catalyst_center:
network_profiles:
switching:
- name: SDA SWITCH PROFILE
dayn_templates:
- ACL_Block
sites:
- Global/Poland/Krakow

9c. Device provisioning: deploying templates with duplicate names to specific devices. Use ProjectName#TemplateName in the name field:

catalyst_center:
inventory:
devices:
- name: FIAB
fqdn_name: FIAB.cisco.eu
device_ip: 181.1.1.1
pid: C9KV-UADP-8P
state: PROVISION
device_role: ACCESS
site: Global/Poland/Krakow/Bld A
dayn_templates:
composite:
- name: PROJECT2#bfd_interval
redeploy_template: ALWAYS
- name: LAN-EN2
fqdn_name: LAN-EN2.cisco.eu
device_ip: 181.1.1.43
pid: C9KV-UADP-8P
state: PROVISION
device_role: ACCESS
site: Global/Poland/Krakow/Bld A
dayn_templates:
composite:
- name: PROJECT2#bfd_interval
redeploy_template: ALWAYS

When the template name is unique across all projects, the project prefix is not required:

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.eu
device_ip: 198.18.130.1
pid: C9KV-UADP-8P
state: PROVISION
device_role: ACCESS
site: Global/Poland/Krakow/Bld A
dayn_templates:
regular:
- name: ACL_43
variables:
- name: acl_ip_address
value: 23.23.23.0

Example-10: Mixing Bare Name and ProjectName#TemplateName Formats

Section titled “Example-10: Mixing Bare Name and ProjectName#TemplateName Formats”

The project#name delimiter is only required when the same template name exists under multiple projects. All existing YAML without the prefix continues to work unchanged.

10a. Templates — ACL_Block is unique to PROJECT1, while Day_N_remove_bfd exists in both projects:

catalyst_center:
templates:
projects:
- name: PROJECT1
dayn_templates:
- name: ACL_Block
description: ACL to block malicious IPs
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9000 Series Virtual Switches"
software_type: IOS-XE
- name: Day_N_remove_bfd
description: Remove BFD from C9kv p2p ISIS interfaces
language: JINJA
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9000 Series Virtual Switches"
software_type: IOS-XE
- name: PROJECT2
dayn_templates:
- name: Day_N_remove_bfd
description: Remove BFD from C9kv p2p ISIS interfaces
language: JINJA
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9000 Series Virtual Switches"
software_type: IOS-XE

10b. Network profiles — ACL_Block is unique so bare name works (old format). Day_N_remove_bfd is duplicated so project#name is required (new format). Both formats coexist in the same list:

catalyst_center:
network_profiles:
switching:
- name: SDA SWITCH PROFILE
dayn_templates:
- ACL_Block
- PROJECT2#Day_N_remove_bfd
sites:
- Global/Poland/Krakow

10c. Device provisioning — a single device deployed with both a duplicate-name template (PROJECT2#Day_N_remove_bfd, new format) and a unique template (ACL_Block, old format):

catalyst_center:
inventory:
devices:
- name: EDGE01
fqdn_name: EDGE01.cisco.eu
device_ip: 198.18.130.1
pid: C9KV-UADP-8P
state: PROVISION
device_role: ACCESS
site: Global/Poland/Krakow/Bld A
dayn_templates:
regular:
- name: PROJECT2#Day_N_remove_bfd
redeploy_template: ALWAYS
- name: ACL_Block
variables:
- name: management_interface
value: Loopback56

In summary — the project#name format is additive. Existing templates, network profiles, and device configurations that use unique template names require no changes.

Note: Using project#name for a template that is unique across projects is also valid and will not break anything. For example, if ACL_Block only exists under PROJECT1, both ACL_Block and PROJECT1#ACL_Block resolve to the same template. The project prefix is only required for duplicate names, but it is accepted for all templates.

Example-11: Template Variable with Binding and Selection Attributes

Section titled “Example-11: Template Variable with Binding and Selection Attributes”

Day-N template with a variable that binds to a Catalyst Center Common Settings data source.

catalyst_center:
templates:
projects:
- name: BIND_SOURCE
dayn_templates:
- name: radius_server
description: RADIUS server configuration
language: JINJA
device_types:
- product_family: "Switches and Hubs"
product_series: "Cisco Catalyst 9000 Series Virtual Switches"
software_type: IOS-XE
variables:
- name: AAAEP
data_type: STRING
required: true
additional_info: AAA Endpoint Server IP Address
param_array: true
selection_type: SINGLE_SELECT
binding: '{"provider":"CommonSettings","source":"CommonSettings","entity":"aaa.endpoint.server","variableName":"__aaaendpointserver","attribute":"ipAddress","attributeToDisplay":"ipAddress","attributesAvailable":["ipAddress","protocol","encryptionScheme"],"params":[{"type":"SITE_UUID","scope":"RUNTIME","value":null},{"type":"MANAGED_DEVICE_UUID","scope":"RUNTIME","value":null}],"value":null,"errorMessage":null,"sortAttribute":null,"sortValues":null,"filterType":"contains","filterValue":"RADIUS","filterByAttribute":"protocol","filterSupported":true}'