Skip to content

wireless-device_provision #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c95fc8e
added GenerateQueryParamString templating helper function
kuba-mazurkiewicz Jul 19, 2024
b853a94
use create_query_path instead of query_param in Create and Update fun…
kuba-mazurkiewicz Jul 19, 2024
d0e2c6f
add query_param_no_body and data_source_no_id attributes
kuba-mazurkiewicz Jul 20, 2024
c1381fd
add import_no_id attribute, if import does not require and ID
kuba-mazurkiewicz Jul 20, 2024
a98ad26
add anycast_gateway
kuba-mazurkiewicz Jul 20, 2024
5545db0
update changelog
kuba-mazurkiewicz Jul 20, 2024
9c69bd5
add transitPeerNetworkId as id to transit_peer_network resource
kuba-mazurkiewicz Jul 20, 2024
c70bd2a
updated changelog
kuba-mazurkiewicz Jul 20, 2024
38d93bf
add fabric_l3_handoff_ip_transit resource and data source
kuba-mazurkiewicz Jul 21, 2024
59173f3
add fabric_device resource and data source
kuba-mazurkiewicz Jul 21, 2024
522d49c
pnp bulk import
kuba-mazurkiewicz Jul 22, 2024
30854ad
update changelog
kuba-mazurkiewicz Jul 22, 2024
9a6533c
rename pnp_device_import to pnp_import_devices
kuba-mazurkiewicz Jul 24, 2024
35565f0
add tag and assign_templates_to_tag
kuba-mazurkiewicz Jul 26, 2024
241fe0a
changed template_ids from List to Set
kuba-mazurkiewicz Jul 26, 2024
2db5bce
update changelog
kuba-mazurkiewicz Jul 26, 2024
b10aeaa
add fabric_provision_device resource and data source
kuba-mazurkiewicz Jul 30, 2024
f478bfb
modified max_async_wait_time in fabric_device resource
kuba-mazurkiewicz Jul 31, 2024
25435ac
modified max_async_wait_time in fabric_provision_device resource
kuba-mazurkiewicz Jul 31, 2024
01fefd8
add wireless_device_provision, add additional params in enterprise_ss…
kuba-mazurkiewicz Aug 1, 2024
4906ccb
update changelog
kuba-mazurkiewicz Aug 1, 2024
9f31f09
Merge branch 'main' into tags_to_template
kuba-mazurkiewicz Aug 5, 2024
df90953
update changelog
kuba-mazurkiewicz Aug 5, 2024
c8291fd
modified res_description
kuba-mazurkiewicz Aug 5, 2024
7252a29
Merge branch 'tags_to_template' into provision_sda
kuba-mazurkiewicz Aug 5, 2024
efa562b
Merge branch 'provision_sda' into fix_provision_borders
kuba-mazurkiewicz Aug 5, 2024
9a02a97
fix data source test for resources with data_source_no_id: true
kuba-mazurkiewicz Aug 5, 2024
7b1404d
fix confilcts
kuba-mazurkiewicz Aug 5, 2024
efb6157
update changelog
kuba-mazurkiewicz Aug 5, 2024
a7d936f
fix typo in virtualNetworkName description in fabric_l3_handoff_ip_tr…
kuba-mazurkiewicz Aug 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 0.1.10 (unreleased)

- Add `wireless_device_provision` resource
- Add `fabric_provision_device` resource and data source
- Add `assign_templates_to_tag` resource and data source
- Add `tag` resource and data source
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/fabric_l3_handoff_ip_transit.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ data "catalystcenter_fabric_l3_handoff_ip_transit" "example" {
- `remote_ipv6_address` (String) Remote ipv6 address for the selected virtual network. Enter the IP addresses and subnet mask in the CIDR notation (IP address/prefix-length). Not applicable if you have already provided an external connectivity ip pool name
- `tcp_mss_adjustment` (Number) TCP maximum segment size (mss) value for the layer 3 handoff. Allowed range is [500-1440]. TCP MSS Adjustment value is applicable for the TCP sessions over both IPv4 and IPv6
- `transit_network_id` (String) ID of the transit network of the layer 3 handoff ip transit
- `virtual_network_name` (String) SName of the virtual network associated with this fabric site
- `virtual_network_name` (String) Name of the virtual network associated with this fabric site
- `vlan_id` (Number) VLAN number for the Switch Virtual Interface (SVI) used to establish BGP peering with the external domain for the virtual network. Allowed VLAN range is 2-4094 except for reserved vlans (1, 1002-1005, 2046, 4094)
6 changes: 6 additions & 0 deletions docs/data-sources/wireless_enterprise_ssid.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ data "catalystcenter_wireless_enterprise_ssid" "example" {
### Read-Only

- `aaa_override` (Boolean) AAA Override
- `auth_key_mgmt` (Set of String) Takes string inputs for the AKMs that should be set true. Possible AKM values : dot1x,dot1x_ft, dot1x_sha, psk, psk_ft, psk_sha, owe, sae, sae_ft
- `basic_service_set_client_idle_timeout` (Number) Basic Service Set Client Idle Timeout
- `client_exclusion_timeout` (Number) Client Exclusion Timeout
- `client_rate_limit` (Number) Client Rate Limit (in bits per second)
Expand All @@ -41,6 +42,8 @@ data "catalystcenter_wireless_enterprise_ssid" "example" {
- `enable_neighbor_list` (Boolean) Enable Neighbor List
- `enable_session_time_out` (Boolean) Enable Session Timeout
- `fast_transition` (String) Fast Transition
- `ghz24_policy` (String) Ghz24 Policy
- `ghz6_policy_client_steering` (Boolean) Ghz6 Policy Client Steering
- `mfp_client_protection` (String) Mfp Client Protection
- `multi_psk_settings` (Attributes List) Multi PSK Settings (Only applicable for SSID with PERSONAL auth type and PSK) (see [below for nested schema](#nestedatt--multi_psk_settings))
- `name` (String) SSID Name
Expand All @@ -50,6 +53,9 @@ data "catalystcenter_wireless_enterprise_ssid" "example" {
- `profile_name` (String) Profile Name
- `protected_management_frame` (String) Protected Management Frame
- `radio_policy` (String) Radio Policy
- `rsn_cipher_suite_ccmp256` (Boolean) Rsn Cipher Suite Ccmp256
- `rsn_cipher_suite_gcmp128` (Boolean) Rsn Cipher Suite Gcmp 128
- `rsn_cipher_suite_gcmp256` (Boolean) Rsn Cipher Suite Gcmp256
- `security_level` (String) Security Level
- `session_time_out` (Number) Session Time Out
- `traffic_type` (String) Traffic Type
Expand Down
1 change: 1 addition & 0 deletions docs/guides/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ description: |-

## 0.1.10 (unreleased)

- Add `wireless_device_provision` resource
- Add `fabric_provision_device` resource and data source
- Add `assign_templates_to_tag` resource and data source
- Add `tag` resource and data source
Expand Down
1 change: 0 additions & 1 deletion docs/resources/fabric_device.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ resource "catalystcenter_fabric_device" "example" {

- `border_priority` (Number) Border priority of the fabric border device. A lower value indicates higher priority
- Range: `1`-`9`
- Default value: `10`
- `border_types` (List of String) List of the border types of the fabric device. Allowed values are [LAYER_2, LAYER_3]
- `default_exit` (Boolean) Set this to make the fabric border device the gateway of last resort for this site. Any unknown traffic will be sent to this fabric border device from edge nodes
- `import_external_routes` (Boolean) Set this to import external routes from other routing protocols (such as BGP) to the fabric control plane
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/fabric_l3_handoff_ip_transit.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ resource "catalystcenter_fabric_l3_handoff_ip_transit" "example" {
- `fabric_id` (String) ID of the fabric this device belongs to
- `network_device_id` (String) Network device ID of the fabric device
- `transit_network_id` (String) ID of the transit network of the layer 3 handoff ip transit
- `virtual_network_name` (String) SName of the virtual network associated with this fabric site
- `virtual_network_name` (String) Name of the virtual network associated with this fabric site
- `vlan_id` (Number) VLAN number for the Switch Virtual Interface (SVI) used to establish BGP peering with the external domain for the virtual network. Allowed VLAN range is 2-4094 except for reserved vlans (1, 1002-1005, 2046, 4094)

### Optional
Expand Down
50 changes: 50 additions & 0 deletions docs/resources/wireless_device_provision.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "catalystcenter_wireless_device_provision Resource - terraform-provider-catalystcenter"
subcategory: "Wireless"
description: |-
This resource provision wireless device. Every time this resource is created or re-created, the Catalyst Center considers provisioning new wireless device. When this resource is destroyed or updated or refreshed, no actions are done either on CatalystCenter or on devices
---

# catalystcenter_wireless_device_provision (Resource)

This resource provision wireless device. Every time this resource is created or re-created, the Catalyst Center considers provisioning new wireless device. When this resource is destroyed or updated or refreshed, no actions are done either on CatalystCenter or on devices

## Example Usage

```terraform
resource "catalystcenter_wireless_device_provision" "example" {
device_name = "WLC_01"
site = "Global/Area1"
managed_ap_locations = ["Global/Area1"]
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `device_name` (String) Controller Name
- `managed_ap_locations` (Set of String) List of managed AP locations
- `site` (String) Full Site Hierarchy where device has to be assigned

### Optional

- `dynamic_interfaces` (Attributes List) Dynamic Interface Details. The required attributes depend on the device type (see [below for nested schema](#nestedatt--dynamic_interfaces))

### Read-Only

- `id` (String) The id of the object

<a id="nestedatt--dynamic_interfaces"></a>
### Nested Schema for `dynamic_interfaces`

Optional:

- `interface_gateway` (String) Interface Gateway. Required for AireOS
- `interface_ip_address` (String) Interface IP Address. Required for AireOS
- `interface_name` (String) Interface Name. Required for both AireOS and EWLC.
- `interface_netmask` (Number) Interface Netmask In CIDR. Required for AireOS
- `lag_or_port_number` (String) LAG or Port Number. Required for AireOS
- `vlan_id` (Number) VLAN ID. Required for both AireOS and EWLC
7 changes: 7 additions & 0 deletions docs/resources/wireless_enterprise_ssid.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ resource "catalystcenter_wireless_enterprise_ssid" "example" {
### Optional

- `aaa_override` (Boolean) AAA Override
- `auth_key_mgmt` (Set of String) Takes string inputs for the AKMs that should be set true. Possible AKM values : dot1x,dot1x_ft, dot1x_sha, psk, psk_ft, psk_sha, owe, sae, sae_ft
- `basic_service_set_client_idle_timeout` (Number) Basic Service Set Client Idle Timeout
- `client_exclusion_timeout` (Number) Client Exclusion Timeout
- `client_rate_limit` (Number) Client Rate Limit (in bits per second)
Expand All @@ -62,6 +63,9 @@ resource "catalystcenter_wireless_enterprise_ssid" "example" {
- `enable_session_time_out` (Boolean) Enable Session Timeout
- `fast_transition` (String) Fast Transition
- Choices: `Adaptive`, `Enable`, `Disable`
- `ghz24_policy` (String) Ghz24 Policy
- Choices: `dot11-g-only`, `dot11-bg-only`
- `ghz6_policy_client_steering` (Boolean) Ghz6 Policy Client Steering
- `mfp_client_protection` (String) Mfp Client Protection
- Choices: `Optional`, `Disabled`, `Required`
- `multi_psk_settings` (Attributes List) Multi PSK Settings (Only applicable for SSID with PERSONAL auth type and PSK) (see [below for nested schema](#nestedatt--multi_psk_settings))
Expand All @@ -73,6 +77,9 @@ resource "catalystcenter_wireless_enterprise_ssid" "example" {
- Choices: `Optional`, `Disabled`, `Required`
- `radio_policy` (String) Radio Policy
- Choices: `Triple band operation(2.4GHz, 5GHz and 6GHz)`, `Triple band operation with band select`, `5GHz only`, `2.4GHz only`, `6GHz only`
- `rsn_cipher_suite_ccmp256` (Boolean) Rsn Cipher Suite Ccmp256
- `rsn_cipher_suite_gcmp128` (Boolean) Rsn Cipher Suite Gcmp 128
- `rsn_cipher_suite_gcmp256` (Boolean) Rsn Cipher Suite Gcmp256
- `session_time_out` (Number) Session Time Out
- `traffic_type` (String) Traffic Type
- Choices: `voicedata`, `data`
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resource "catalystcenter_wireless_device_provision" "example" {
device_name = "WLC_01"
site = "Global/Area1"
managed_ap_locations = ["Global/Area1"]
}
3 changes: 1 addition & 2 deletions gen/definitions/fabric_device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ put_id_include_path: 0.id
import_no_id: true
data_source_no_id: true
put_no_id: true
max_async_wait_time: 120
max_async_wait_time: 300
doc_category: SDA
test_tags: [SDA]
attributes:
Expand Down Expand Up @@ -74,7 +74,6 @@ attributes:
max_int: 9
description: Border priority of the fabric border device. A lower value indicates higher priority
example: 5
default_value: 10
- model_name: prependAutonomousSystemCount
data_path: '0.borderDeviceSettings.layer3Settings'
response_data_path: response.0.borderDeviceSettings.layer3Settings.prependAutonomousSystemCount
Expand Down
2 changes: 1 addition & 1 deletion gen/definitions/fabric_l3_handoff_ip_transit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ attributes:
response_data_path: virtualNetworkName
mandatory: true
type: String
description: SName of the virtual network associated with this fabric site
description: Name of the virtual network associated with this fabric site
example: SDA_VN1
- model_name: vlanId
data_path: '0'
Expand Down
2 changes: 1 addition & 1 deletion gen/definitions/fabric_provision_device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import_no_id: true
data_source_no_id: true
put_id_include_path: "0.id"
put_no_id: true
max_async_wait_time: 120
max_async_wait_time: 300
doc_category: SDA
test_tags: [SDA]
attributes:
Expand Down
67 changes: 67 additions & 0 deletions gen/definitions/wireless_device_provision.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
name: Wireless Device Provision
rest_endpoint: /dna/intent/api/v1/wireless/provision
res_description: 'This resource provision wireless device. Every time this resource is created or re-created, the Catalyst Center considers provisioning new wireless device.
When this resource is destroyed or updated or refreshed, no actions are done either on CatalystCenter or on devices'
no_data_source: true
no_read: true
no_delete: true
no_import: true
put_no_id: true
id_from_attribute: true
doc_category: Wireless
max_async_wait_time: 300
test_tags: [WIRELESS]
attributes:
- model_name: deviceName
requires_replace: true
data_path: '0'
id: true
mandatory: true
description: Controller Name
type: String
example: WLC_01
- model_name: site
requires_replace: true
data_path: '0'
mandatory: true
description: Full Site Hierarchy where device has to be assigned
type: String
example: Global/Area1
- model_name: managedAPLocations
tf_name: managed_ap_locations
requires_replace: true
data_path: '0'
mandatory: true
description: List of managed AP locations
type: Set
element_type: String
example: Global/Area1
- model_name: dynamicInterfaces
type: List
description: Dynamic Interface Details. The required attributes depend on the device type
requires_replace: true
data_path: '0'
exclude_test: true
attributes:
- model_name: interfaceIPAddress
tf_name: interface_ip_address
type: String
description: Interface IP Address. Required for AireOS
- model_name: interfaceNetmaskInCIDR
tf_name: interface_netmask
type: Int64
description: Interface Netmask In CIDR. Required for AireOS
- model_name: interfaceGateway
type: String
description: Interface Gateway. Required for AireOS
- model_name: lagOrPortNumber
type: String
description: LAG or Port Number. Required for AireOS
- model_name: vlanId
type: Int64
description: VLAN ID. Required for both AireOS and EWLC
- model_name: interfaceName
type: String
description: Interface Name. Required for both AireOS and EWLC.

34 changes: 34 additions & 0 deletions gen/definitions/wireless_enterprise_ssid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,37 @@ attributes:
response_data_path: 0.ssidDetails.0.clientRateLimit
description: Client Rate Limit (in bits per second)
exclude_test: true
- model_name: authKeyMgmt
type: Set
element_type: String
response_data_path: 0.ssidDetails.0.authKeyMgmt
description: 'Takes string inputs for the AKMs that should be set true. Possible AKM values : dot1x,dot1x_ft, dot1x_sha, psk, psk_ft, psk_sha, owe, sae, sae_ft'
exclude_test: true
- model_name: rsnCipherSuiteGcmp256
type: Bool
response_data_path: 0.ssidDetails.0.rsnCipherSuiteGcmp256
description: Rsn Cipher Suite Gcmp256
exclude_test: true
- model_name: rsnCipherSuiteCcmp256
type: Bool
response_data_path: 0.ssidDetails.0.rsnCipherSuiteCcmp256
description: Rsn Cipher Suite Ccmp256
exclude_test: true
- model_name: rsnCipherSuiteGcmp128
type: Bool
response_data_path: 0.ssidDetails.0.rsnCipherSuiteGcmp128
description: Rsn Cipher Suite Gcmp 128
exclude_test: true
- model_name: ghz6PolicyClientSteering
type: Bool
response_data_path: 0.ssidDetails.0.ghz6PolicyClientSteering
description: Ghz6 Policy Client Steering
exclude_test: true
- model_name: ghz24Policy
type: String
enum_values:
- dot11-g-only
- dot11-bg-only
response_data_path: 0.ssidDetails.0.ghz24Policy
description: Ghz24 Policy
exclude_test: true
2 changes: 2 additions & 0 deletions gen/templates/data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ func testAccDataSourceCc{{camelCase .Name}}Config() string {

config += `
data "catalystcenter_{{snakeCase .Name}}" "test" {
{{- if not .DataSourceNoId}}
id = catalystcenter_{{snakeCase $name}}.test.id
{{- end}}
{{- range .Attributes}}
{{- if or .Reference .QueryParam}}
{{.TfName}} = {{if .TestValue}}{{.TestValue}}{{else}}{{if eq .Type "String"}}"{{.Example}}"{{else if isStringListSet .}}["{{.Example}}"]{{else if isInt64ListSet .}}[{{.Example}}]{{else}}{{.Example}}{{end}}{{end}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ func testAccDataSourceCcAnycastGatewayConfig() string {

config += `
data "catalystcenter_anycast_gateway" "test" {
id = catalystcenter_anycast_gateway.test.id
fabric_id = catalystcenter_fabric_site.test.id
virtual_network_name = catalystcenter_virtual_network_to_fabric_site.test.virtual_network_name
ip_pool_name = catalystcenter_ip_pool_reservation.test.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ func testAccDataSourceCcAssignTemplatesToTagConfig() string {

config += `
data "catalystcenter_assign_templates_to_tag" "test" {
id = catalystcenter_assign_templates_to_tag.test.id
tag_id = catalystcenter_tag.test.id
}
`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ func testAccDataSourceCcFabricDeviceConfig() string {

config += `
data "catalystcenter_fabric_device" "test" {
id = catalystcenter_fabric_device.test.id
network_device_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1"
fabric_id = catalystcenter_fabric_site.test.id
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (d *FabricL3HandoffIPTransitDataSource) Schema(ctx context.Context, req dat
Computed: true,
},
"virtual_network_name": schema.StringAttribute{
MarkdownDescription: "SName of the virtual network associated with this fabric site",
MarkdownDescription: "Name of the virtual network associated with this fabric site",
Computed: true,
},
"vlan_id": schema.Int64Attribute{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ func testAccDataSourceCcFabricProvisionDeviceConfig() string {

config += `
data "catalystcenter_fabric_provision_device" "test" {
id = catalystcenter_fabric_provision_device.test.id
site_id = catalystcenter_area.test.id
network_device_id = "4cb565d3-1944-42be-be9f-a87cff79e831"
}
Expand Down
1 change: 0 additions & 1 deletion internal/provider/data_source_catalystcenter_tag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ func testAccDataSourceCcTagConfig() string {

config += `
data "catalystcenter_tag" "test" {
id = catalystcenter_tag.test.id
name = "Tag1"
}
`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ func testAccDataSourceCcTransitPeerNetworkConfig() string {

config += `
data "catalystcenter_transit_peer_network" "test" {
id = catalystcenter_transit_peer_network.test.id
transit_peer_network_name = "TRANSIT_1"
}
`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,31 @@ func (d *WirelessEnterpriseSSIDDataSource) Schema(ctx context.Context, req datas
MarkdownDescription: "Client Rate Limit (in bits per second)",
Computed: true,
},
"auth_key_mgmt": schema.SetAttribute{
MarkdownDescription: "Takes string inputs for the AKMs that should be set true. Possible AKM values : dot1x,dot1x_ft, dot1x_sha, psk, psk_ft, psk_sha, owe, sae, sae_ft",
ElementType: types.StringType,
Computed: true,
},
"rsn_cipher_suite_gcmp256": schema.BoolAttribute{
MarkdownDescription: "Rsn Cipher Suite Gcmp256",
Computed: true,
},
"rsn_cipher_suite_ccmp256": schema.BoolAttribute{
MarkdownDescription: "Rsn Cipher Suite Ccmp256",
Computed: true,
},
"rsn_cipher_suite_gcmp128": schema.BoolAttribute{
MarkdownDescription: "Rsn Cipher Suite Gcmp 128",
Computed: true,
},
"ghz6_policy_client_steering": schema.BoolAttribute{
MarkdownDescription: "Ghz6 Policy Client Steering",
Computed: true,
},
"ghz24_policy": schema.StringAttribute{
MarkdownDescription: "Ghz24 Policy",
Computed: true,
},
},
}
}
Expand Down
Loading