Skip to content

Commit feee716

Browse files
Release/0.1.0 (#10)
* add fabric_l3_handoff_sda_transit support * fix issue with sda_transit under border device * fix provision fabric wireless controller * fix provision fabric wireless controller * fix provision fabric wireless controller * add anycast gateway dependency to fabric_vlan_to_ssid * fix enable fabric in wireless_profile * fix enable fabric in wireless_profile * fix enable fabric in wireless_profile * add copying_config to regular_templates deploy * Revert "add copying_config to regular_templates deploy" This reverts commit 7147925. * add support for saving running config to starup config in regular templates deploy * add support for INFRA_VN and DEFAULT_VN layer3 virtual networks * bump up provider version * add provision_device dependencies to sda transit network * modified README.md * add support for vtl and vlt extensions for velocity templates * workaround for issue in discovery when using discovery_type Multi Range * add wlan_profile_name attribute to ssid_details under wireless_profile * bump up utils version * fixes in pnp * fixes in pnp * add assign state for assigning device to site without provisioning * fix l3_handoff dependency * Revert "fix l3_handoff dependency" This reverts commit 9150268. * add time.sleep for destroy on assign_device_to-site * modified dependency between assign_to_site and provision * refactor code * BREAKING CHANGE: Add support to update authentication_template settings globally and on fabric site level * add fabric_zone and support for same l3_vn under multiple anycast_gateways * add catalystcenter_aaa_settings.aaa_servers depdendency to catalystcenter_fabric_site * fix fabric_zone for edge_device * add fabric_zone to port_assignment * fix dependency on sda tansit * tie version to provider 0.2.9 * use new version of wireless_rf_profile * update examples to use 0.1.0 module version * fix linting * fix issue with ssid to vlan mapping in fabric * Fix wireless ssid radio type mapping to match API response * simplify rule to check if device is border * add cli_creds dependencies to discovery * minor fix in wireless_rf_profile * add support for assigning tag to device --------- Co-authored-by: rafal-slominski <rslominski@gmail.com>
1 parent fdb4569 commit feee716

13 files changed

Lines changed: 567 additions & 276 deletions

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## 0.1.0 (unreleased)
2+
3+
- Add support for assigning tag to device
4+
- Add support for `CORE` and `DISTRIBUTION` role
5+
- Fix wireless ssid radio type mapping to match API response
6+
- Fix issue with ssid to vlan mapping in fabric
7+
- Add support for same `l3_virtual_network` under multiple `anycast_gateways`
8+
- Add `fabric_zone` support and adding `l3_virtual_networks` under fabric zone
9+
- BREAKING CHANGE: Add support to update `authentication_template` settings globally and on fabric site level
10+
- Add `ASSIGN` state for assigning device to site without provisioning
11+
- Fix pnp issue when adding multiple devices
12+
- Add support for `.vtl` and `.vlt` extensions for velocity templates
13+
- Add support for `INFRA_VN` and `DEFAULT_VN` layer3 virtual networks
14+
- Add support for saving running config to startup config while deploying regular templates
15+
- Fix issue with anycast_gateway dependencies to fabric_vlan_to_ssid
16+
117
## 0.0.4-beta1
218

319
- BREAKING CHANGE: Fix issue with assigning the same VLAN to different anycast gateways from different fabric sites

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ catalyst_center:
2727
```hcl
2828
module "catalystcenter" {
2929
source = "netascode/nac-catalystcenter/catalystcenter"
30-
version = "0.0.4-beta1"
30+
version = "0.1.0"
3131
3232
yaml_files = ["area.yaml"]
3333
}
@@ -38,10 +38,10 @@ module "catalystcenter" {
3838
| Name | Version |
3939
|------|---------|
4040
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.8.0 |
41-
| <a name="requirement_catalystcenter"></a> [catalystcenter](#requirement\_catalystcenter) | >= 0.2.6, < 0.2.10 |
41+
| <a name="requirement_catalystcenter"></a> [catalystcenter](#requirement\_catalystcenter) | >= 0.2.10 |
4242
| <a name="requirement_local"></a> [local](#requirement\_local) | >= 2.3.0 |
4343
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.12.1 |
44-
| <a name="requirement_utils"></a> [utils](#requirement\_utils) | >= 0.2.6 |
44+
| <a name="requirement_utils"></a> [utils](#requirement\_utils) | >= 1.0.0 |
4545
## Inputs
4646

4747
| Name | Description | Type | Default | Required |
@@ -67,6 +67,8 @@ module "catalystcenter" {
6767
| [catalystcenter_area.area_1](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/area) | resource |
6868
| [catalystcenter_area.area_2](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/area) | resource |
6969
| [catalystcenter_assign_credentials.assign_credentials](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/assign_credentials) | resource |
70+
| [catalystcenter_assign_device_to_site.devices_to_site](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/assign_device_to_site) | resource |
71+
| [catalystcenter_assign_devices_to_tag.device_to_tag](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/assign_devices_to_tag) | resource |
7072
| [catalystcenter_assign_templates_to_tag.template_to_tag](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/assign_templates_to_tag) | resource |
7173
| [catalystcenter_associate_site_to_network_profile.site_to_network_profile](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/associate_site_to_network_profile) | resource |
7274
| [catalystcenter_associate_site_to_network_profile.site_to_wireless_network_profile](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/associate_site_to_network_profile) | resource |
@@ -91,13 +93,15 @@ module "catalystcenter" {
9193
| [catalystcenter_fabric_l2_handoff.l2_handoff_no_anycast](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/fabric_l2_handoff) | resource |
9294
| [catalystcenter_fabric_l2_virtual_network.l2_vn](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/fabric_l2_virtual_network) | resource |
9395
| [catalystcenter_fabric_l3_handoff_ip_transit.l3_handoff_ip_transit](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/fabric_l3_handoff_ip_transit) | resource |
96+
| [catalystcenter_fabric_l3_handoff_sda_transit.sda_transit](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/fabric_l3_handoff_sda_transit) | resource |
9497
| [catalystcenter_fabric_l3_virtual_network.l3_vn](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/fabric_l3_virtual_network) | resource |
9598
| [catalystcenter_fabric_port_assignments.port_assignments](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/fabric_port_assignments) | resource |
9699
| [catalystcenter_fabric_provision_device.border_device](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/fabric_provision_device) | resource |
97100
| [catalystcenter_fabric_provision_device.edge_device](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/fabric_provision_device) | resource |
98101
| [catalystcenter_fabric_provision_device.non_fabric_device](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/fabric_provision_device) | resource |
99102
| [catalystcenter_fabric_site.fabric_site](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/fabric_site) | resource |
100103
| [catalystcenter_fabric_vlan_to_ssid.vlan_to_ssid](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/fabric_vlan_to_ssid) | resource |
104+
| [catalystcenter_fabric_zone.fabric_zone](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/fabric_zone) | resource |
101105
| [catalystcenter_floor.floor](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/floor) | resource |
102106
| [catalystcenter_ip_pool.ip_pool_v4](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/ip_pool) | resource |
103107
| [catalystcenter_ip_pool.ip_pool_v6](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/ip_pool) | resource |
@@ -107,8 +111,8 @@ module "catalystcenter" {
107111
| [catalystcenter_network_profile.switching_network_profile](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/network_profile) | resource |
108112
| [catalystcenter_ntp_settings.ntp_servers](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/ntp_settings) | resource |
109113
| [catalystcenter_pnp_config_preview.config_preview](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/pnp_config_preview) | resource |
114+
| [catalystcenter_pnp_device.pnp_device](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/pnp_device) | resource |
110115
| [catalystcenter_pnp_device_claim_site.claim_device](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/pnp_device_claim_site) | resource |
111-
| [catalystcenter_pnp_import_devices.pnp_devices](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/pnp_import_devices) | resource |
112116
| [catalystcenter_project.project](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/project) | resource |
113117
| [catalystcenter_tag.tag](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/tag) | resource |
114118
| [catalystcenter_telemetry_settings.telemetry_settings](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/telemetry_settings) | resource |
@@ -118,6 +122,10 @@ module "catalystcenter" {
118122
| [catalystcenter_template_version.regular_commit_version](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/template_version) | resource |
119123
| [catalystcenter_timezone_settings.timezone](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/timezone_settings) | resource |
120124
| [catalystcenter_transit_network.transit](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/transit_network) | resource |
125+
| [catalystcenter_update_authentication_profile.closed_authentication](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/update_authentication_profile) | resource |
126+
| [catalystcenter_update_authentication_profile.global_authentication_template](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/update_authentication_profile) | resource |
127+
| [catalystcenter_update_authentication_profile.low_impact](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/update_authentication_profile) | resource |
128+
| [catalystcenter_update_authentication_profile.open_authentication](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/update_authentication_profile) | resource |
121129
| [catalystcenter_wireless_device_provision.wireless_controller](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/wireless_device_provision) | resource |
122130
| [catalystcenter_wireless_profile.wireless_profile](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/wireless_profile) | resource |
123131
| [catalystcenter_wireless_rf_profile.rf_profile](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/resources/wireless_rf_profile) | resource |
@@ -129,7 +137,6 @@ module "catalystcenter" {
129137
| [catalystcenter_area.global](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/data-sources/area) | data source |
130138
| [catalystcenter_credentials_cli.cli_credentials](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/data-sources/credentials_cli) | data source |
131139
| [catalystcenter_network_devices.all_devices](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/data-sources/network_devices) | data source |
132-
| [catalystcenter_pnp_device.pnp_device](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/data-sources/pnp_device) | data source |
133140
| [catalystcenter_project.onboarding](https://registry.terraform.io/providers/CiscoDevNet/catalystcenter/latest/docs/data-sources/project) | data source |
134141
## Modules
135142

cc_authentication_templates.tf

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
resource "catalystcenter_update_authentication_profile" "global_authentication_template" {
2+
for_each = { for template in try(local.catalyst_center.authentication_templates, []) : template.name => template }
3+
4+
authentication_profile_name = each.value.name
5+
authentication_order = try(each.value.authentication_order, local.defaults.catalyst_center.authentication_templates.authentication_order, null)
6+
dot1x_to_mab_fallback_timeout = try(each.value.dot1x_to_mab_fallback_timeout, local.defaults.catalyst_center.authentication_templates.dot1x_to_mab_fallback_timeout, null)
7+
wake_on_lan = try(each.value.wake_on_lan, local.defaults.catalyst_center.authentication_templates.wake_on_lan, null)
8+
number_of_hosts = try(each.value.number_of_hosts, local.defaults.catalyst_center.authentication_templates.number_of_hosts, null)
9+
is_bpdu_guard_enabled = each.value.name == "Closed Authentication" ? try(each.value.bpdu_guard, local.defaults.catalyst_center.authentication_templates.bpdu_guard, null) : null
10+
pre_auth_acl_enabled = each.value.name == "Low Impact" ? try(each.value.pre_auth_acl.enabled, local.defaults.catalyst_center.authentication_templates.pre_auth_acl.enabled, null) : null
11+
pre_auth_acl_description = each.value.name == "Low Impact" ? try(each.value.pre_auth_acl.description, local.defaults.catalyst_center.authentication_templates.pre_auth_acl.description, null) : null
12+
pre_auth_acl_implicit_action = each.value.name == "Low Impact" ? try(each.value.pre_auth_acl.implicit_action, local.defaults.catalyst_center.authentication_templates.pre_auth_acl.implicit_action, null) : null
13+
pre_auth_acl_access_contracts = each.value.name == "Low Impact" ? try([for contract in each.value.pre_auth_acl.access_contracts : {
14+
"action" : contract.action,
15+
"port" : contract.port,
16+
"protocol" : contract.protocol
17+
}], local.defaults.catalyst_center.authentication_templates.pre_auth_acl.access_contracts, null) : null
18+
19+
lifecycle {
20+
ignore_changes = [pre_auth_acl_description]
21+
}
22+
}
23+
24+
resource "catalystcenter_update_authentication_profile" "low_impact" {
25+
for_each = { for fabric_site in try(local.catalyst_center.fabric.fabric_sites, []) : fabric_site.name => fabric_site if fabric_site.authentication_template.name == "Low Impact" }
26+
27+
fabric_id = try(local.fabric_site_id_list[each.key], null)
28+
authentication_profile_name = "Low Impact"
29+
authentication_order = try(each.value.authentication_template.authentication_order, local.defaults.catalyst_center.authentication_templates.authentication_order, null)
30+
dot1x_to_mab_fallback_timeout = try(each.value.authentication_template.dot1x_to_mab_fallback_timeout, local.defaults.catalyst_center.authentication_templates.dot1x_to_mab_fallback_timeout, null)
31+
wake_on_lan = try(each.value.authentication_template.wake_on_lan, local.defaults.catalyst_center.authentication_templates.wake_on_lan, null)
32+
number_of_hosts = try(each.value.authentication_template.number_of_hosts, local.defaults.catalyst_center.authentication_templates.number_of_hosts, null)
33+
pre_auth_acl_enabled = each.value.authentication_template.name == "Low Impact" ? try(each.value.authentication_template.pre_auth_acl.enabled, local.defaults.catalyst_center.authentication_templates.pre_auth_acl.enabled, null) : null
34+
pre_auth_acl_description = each.value.authentication_template.name == "Low Impact" ? try(each.value.authentication_template.pre_auth_acl.description, local.defaults.catalyst_center.authentication_templates.pre_auth_acl.description, null) : null
35+
pre_auth_acl_implicit_action = each.value.authentication_template.name == "Low Impact" ? try(each.value.authentication_template.pre_auth_acl.implicit_action, local.defaults.catalyst_center.authentication_templates.pre_auth_acl.implicit_action, null) : null
36+
pre_auth_acl_access_contracts = each.value.authentication_template.name == "Low Impact" ? try([for contract in each.value.authentication_template.pre_auth_acl.access_contracts : {
37+
"action" : contract.action,
38+
"port" : contract.port,
39+
"protocol" : contract.protocol
40+
}], local.defaults.catalyst_center.authentication_templates.pre_auth_acl.access_contracts, null) : null
41+
42+
lifecycle {
43+
ignore_changes = [pre_auth_acl_description]
44+
}
45+
}
46+
47+
resource "catalystcenter_update_authentication_profile" "open_authentication" {
48+
for_each = { for fabric_site in try(local.catalyst_center.fabric.fabric_sites, []) : fabric_site.name => fabric_site if fabric_site.authentication_template.name == "Open Authentication" }
49+
50+
fabric_id = try(local.fabric_site_id_list[each.key], null)
51+
authentication_profile_name = "Open Authentication"
52+
authentication_order = try(each.value.authentication_template.authentication_order, local.defaults.catalyst_center.authentication_templates.authentication_order, null)
53+
dot1x_to_mab_fallback_timeout = try(each.value.authentication_template.dot1x_to_mab_fallback_timeout, local.defaults.catalyst_center.authentication_templates.dot1x_to_mab_fallback_timeout, null)
54+
wake_on_lan = try(each.value.authentication_template.wake_on_lan, local.defaults.catalyst_center.authentication_templates.wake_on_lan, null)
55+
number_of_hosts = try(each.value.authentication_template.number_of_hosts, local.defaults.catalyst_center.authentication_templates.number_of_hosts, null)
56+
}
57+
58+
resource "catalystcenter_update_authentication_profile" "closed_authentication" {
59+
for_each = { for fabric_site in try(local.catalyst_center.fabric.fabric_sites, []) : fabric_site.name => fabric_site if fabric_site.authentication_template.name == "Closed Authentication" }
60+
61+
fabric_id = try(local.fabric_site_id_list[each.key], null)
62+
authentication_profile_name = "Closed Authentication"
63+
authentication_order = try(each.value.authentication_template.authentication_order, local.defaults.catalyst_center.authentication_templates.authentication_order, null)
64+
dot1x_to_mab_fallback_timeout = try(each.value.authentication_template.dot1x_to_mab_fallback_timeout, local.defaults.catalyst_center.authentication_templates.dot1x_to_mab_fallback_timeout, null)
65+
wake_on_lan = try(each.value.authentication_template.wake_on_lan, local.defaults.catalyst_center.authentication_templates.wake_on_lan, null)
66+
number_of_hosts = try(each.value.authentication_template.number_of_hosts, local.defaults.catalyst_center.authentication_templates.number_of_hosts, null)
67+
is_bpdu_guard_enabled = try(each.value.authentication_template.bpdu_guard, local.defaults.catalyst_center.authentication_templates.bpdu_guard, null)
68+
}

0 commit comments

Comments
 (0)