From 63875118312022fb17518efbdeb1d7469868ed4b Mon Sep 17 00:00:00 2001 From: danischm Date: Wed, 18 Oct 2023 08:52:00 +0200 Subject: [PATCH] Use type set for device types attribute of feature template resources --- CHANGELOG.md | 1 + docs/data-sources/cedge_aaa_feature_template.md | 2 +- docs/data-sources/cedge_global_feature_template.md | 2 +- docs/data-sources/cisco_banner_feature_template.md | 2 +- docs/data-sources/cisco_bfd_feature_template.md | 2 +- docs/data-sources/cisco_bgp_feature_template.md | 2 +- docs/data-sources/cisco_dhcp_server_feature_template.md | 2 +- docs/data-sources/cisco_logging_feature_template.md | 2 +- docs/data-sources/cisco_ntp_feature_template.md | 2 +- docs/data-sources/cisco_omp_feature_template.md | 2 +- docs/data-sources/cisco_ospf_feature_template.md | 2 +- .../cisco_secure_internet_gateway_feature_template.md | 2 +- docs/data-sources/cisco_security_feature_template.md | 2 +- .../cisco_sig_credentials_feature_template.md | 2 +- docs/data-sources/cisco_snmp_feature_template.md | 2 +- docs/data-sources/cisco_system_feature_template.md | 2 +- docs/data-sources/cisco_thousandeyes_feature_template.md | 2 +- docs/data-sources/cisco_vpn_feature_template.md | 2 +- docs/data-sources/cisco_vpn_interface_feature_template.md | 2 +- .../cisco_vpn_interface_ipsec_feature_template.md | 2 +- docs/data-sources/cli_template_feature_template.md | 2 +- docs/guides/changelog.md | 1 + docs/resources/cedge_aaa_feature_template.md | 2 +- docs/resources/cedge_global_feature_template.md | 2 +- docs/resources/cisco_banner_feature_template.md | 2 +- docs/resources/cisco_bfd_feature_template.md | 2 +- docs/resources/cisco_bgp_feature_template.md | 2 +- docs/resources/cisco_dhcp_server_feature_template.md | 2 +- docs/resources/cisco_logging_feature_template.md | 2 +- docs/resources/cisco_ntp_feature_template.md | 2 +- docs/resources/cisco_omp_feature_template.md | 2 +- docs/resources/cisco_ospf_feature_template.md | 2 +- .../cisco_secure_internet_gateway_feature_template.md | 2 +- docs/resources/cisco_security_feature_template.md | 2 +- docs/resources/cisco_sig_credentials_feature_template.md | 2 +- docs/resources/cisco_snmp_feature_template.md | 2 +- docs/resources/cisco_system_feature_template.md | 2 +- docs/resources/cisco_thousandeyes_feature_template.md | 2 +- docs/resources/cisco_vpn_feature_template.md | 2 +- docs/resources/cisco_vpn_interface_feature_template.md | 2 +- .../cisco_vpn_interface_ipsec_feature_template.md | 2 +- docs/resources/cli_template_feature_template.md | 2 +- gen/templates/feature_templates/data_source.go | 2 +- gen/templates/feature_templates/model.go | 6 +++--- gen/templates/feature_templates/resource.go | 2 +- .../data_source_sdwan_cedge_aaa_feature_template.go | 2 +- .../data_source_sdwan_cedge_global_feature_template.go | 2 +- .../data_source_sdwan_cisco_banner_feature_template.go | 2 +- .../data_source_sdwan_cisco_bfd_feature_template.go | 2 +- .../data_source_sdwan_cisco_bgp_feature_template.go | 2 +- ...ata_source_sdwan_cisco_dhcp_server_feature_template.go | 2 +- .../data_source_sdwan_cisco_logging_feature_template.go | 2 +- .../data_source_sdwan_cisco_ntp_feature_template.go | 2 +- .../data_source_sdwan_cisco_omp_feature_template.go | 2 +- .../data_source_sdwan_cisco_ospf_feature_template.go | 2 +- ...dwan_cisco_secure_internet_gateway_feature_template.go | 2 +- .../data_source_sdwan_cisco_security_feature_template.go | 2 +- ...source_sdwan_cisco_sig_credentials_feature_template.go | 2 +- .../data_source_sdwan_cisco_snmp_feature_template.go | 2 +- .../data_source_sdwan_cisco_system_feature_template.go | 2 +- ...ta_source_sdwan_cisco_thousandeyes_feature_template.go | 2 +- .../data_source_sdwan_cisco_vpn_feature_template.go | 2 +- ...a_source_sdwan_cisco_vpn_interface_feature_template.go | 2 +- ...ce_sdwan_cisco_vpn_interface_ipsec_feature_template.go | 2 +- .../data_source_sdwan_cli_template_feature_template.go | 2 +- internal/provider/helpers/utils.go | 8 ++++++++ .../provider/model_sdwan_cedge_aaa_feature_template.go | 6 +++--- .../provider/model_sdwan_cedge_global_feature_template.go | 6 +++--- .../provider/model_sdwan_cisco_banner_feature_template.go | 6 +++--- .../provider/model_sdwan_cisco_bfd_feature_template.go | 6 +++--- .../provider/model_sdwan_cisco_bgp_feature_template.go | 6 +++--- .../model_sdwan_cisco_dhcp_server_feature_template.go | 6 +++--- .../model_sdwan_cisco_logging_feature_template.go | 6 +++--- .../provider/model_sdwan_cisco_ntp_feature_template.go | 6 +++--- .../provider/model_sdwan_cisco_omp_feature_template.go | 6 +++--- .../provider/model_sdwan_cisco_ospf_feature_template.go | 6 +++--- ...dwan_cisco_secure_internet_gateway_feature_template.go | 6 +++--- .../model_sdwan_cisco_security_feature_template.go | 6 +++--- .../model_sdwan_cisco_sig_credentials_feature_template.go | 6 +++--- .../provider/model_sdwan_cisco_snmp_feature_template.go | 6 +++--- .../provider/model_sdwan_cisco_system_feature_template.go | 6 +++--- .../model_sdwan_cisco_thousandeyes_feature_template.go | 6 +++--- .../provider/model_sdwan_cisco_vpn_feature_template.go | 6 +++--- .../model_sdwan_cisco_vpn_interface_feature_template.go | 6 +++--- ...el_sdwan_cisco_vpn_interface_ipsec_feature_template.go | 6 +++--- .../provider/model_sdwan_cli_template_feature_template.go | 6 +++--- .../provider/resource_sdwan_cedge_aaa_feature_template.go | 2 +- .../resource_sdwan_cedge_global_feature_template.go | 2 +- .../resource_sdwan_cisco_banner_feature_template.go | 2 +- .../provider/resource_sdwan_cisco_bfd_feature_template.go | 2 +- .../provider/resource_sdwan_cisco_bgp_feature_template.go | 2 +- .../resource_sdwan_cisco_dhcp_server_feature_template.go | 2 +- .../resource_sdwan_cisco_logging_feature_template.go | 2 +- .../provider/resource_sdwan_cisco_ntp_feature_template.go | 2 +- .../provider/resource_sdwan_cisco_omp_feature_template.go | 2 +- .../resource_sdwan_cisco_ospf_feature_template.go | 2 +- ...dwan_cisco_secure_internet_gateway_feature_template.go | 2 +- .../resource_sdwan_cisco_security_feature_template.go | 2 +- ...source_sdwan_cisco_sig_credentials_feature_template.go | 2 +- .../resource_sdwan_cisco_snmp_feature_template.go | 2 +- .../resource_sdwan_cisco_system_feature_template.go | 2 +- .../resource_sdwan_cisco_thousandeyes_feature_template.go | 2 +- .../provider/resource_sdwan_cisco_vpn_feature_template.go | 2 +- ...resource_sdwan_cisco_vpn_interface_feature_template.go | 2 +- ...ce_sdwan_cisco_vpn_interface_ipsec_feature_template.go | 2 +- .../resource_sdwan_cli_template_feature_template.go | 2 +- templates/guides/changelog.md.tmpl | 1 + 107 files changed, 156 insertions(+), 145 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6db802af..4f7f3415 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Add `sdwan_advanced_malware_protection_policy_definition` resource and data source - BREAKING CHANGE: Rename `group` attribute of `sdwan_cedge_aaa_feature_template` resource and data source to `groups` and fix type +- Use type `Set` for `device_types` attributes of feature template resources and data sources ## 0.2.8 diff --git a/docs/data-sources/cedge_aaa_feature_template.md b/docs/data-sources/cedge_aaa_feature_template.md index 479f478b..973c05a5 100644 --- a/docs/data-sources/cedge_aaa_feature_template.md +++ b/docs/data-sources/cedge_aaa_feature_template.md @@ -35,7 +35,7 @@ data "sdwan_cedge_aaa_feature_template" "example" { - `authorization_console_variable` (String) Variable name - `authorization_rules` (Attributes List) Configure the Authorization Rules (see [below for nested schema](#nestedatt--authorization_rules)) - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - `dot1x_accounting` (Boolean) Accounting configurations parameters - `dot1x_accounting_variable` (String) Variable name - `dot1x_authentication` (Boolean) Authentication configurations parameters diff --git a/docs/data-sources/cedge_global_feature_template.md b/docs/data-sources/cedge_global_feature_template.md index a70d02a0..022ef10b 100644 --- a/docs/data-sources/cedge_global_feature_template.md +++ b/docs/data-sources/cedge_global_feature_template.md @@ -37,7 +37,7 @@ data "sdwan_cedge_global_feature_template" "example" { - `console_logging` (Boolean) Configure Console Logging - `console_logging_variable` (String) Variable name - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - `domain_lookup` (Boolean) Configure Domain-Lookup - `domain_lookup_variable` (String) Variable name - `ftp_passive` (Boolean) Set Passive FTP diff --git a/docs/data-sources/cisco_banner_feature_template.md b/docs/data-sources/cisco_banner_feature_template.md index c4d5f4aa..c59faae6 100644 --- a/docs/data-sources/cisco_banner_feature_template.md +++ b/docs/data-sources/cisco_banner_feature_template.md @@ -29,7 +29,7 @@ data "sdwan_cisco_banner_feature_template" "example" { ### Read-Only - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - `login` (String) Set message to display before login prompt - `login_variable` (String) Variable name - `motd` (String) Set message to display after a user logs in diff --git a/docs/data-sources/cisco_bfd_feature_template.md b/docs/data-sources/cisco_bfd_feature_template.md index 6103d784..929c81f9 100644 --- a/docs/data-sources/cisco_bfd_feature_template.md +++ b/docs/data-sources/cisco_bfd_feature_template.md @@ -32,7 +32,7 @@ data "sdwan_cisco_bfd_feature_template" "example" { - `default_dscp` (Number) Set default DSCP value for BFD packets - `default_dscp_variable` (String) Variable name - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - `multiplier` (Number) Set the number of polling intervals used to determine tunnel SLA class - `multiplier_variable` (String) Variable name - `poll_interval` (Number) Set how often BFD polls tunnels to collect packet latency, loss, and statistics diff --git a/docs/data-sources/cisco_bgp_feature_template.md b/docs/data-sources/cisco_bgp_feature_template.md index 9ddb1817..0caab688 100644 --- a/docs/data-sources/cisco_bgp_feature_template.md +++ b/docs/data-sources/cisco_bgp_feature_template.md @@ -38,7 +38,7 @@ data "sdwan_cisco_bgp_feature_template" "example" { - `description` (String) The description of the feature template - `deterministic_med` (Boolean) Compare MEDs from all routes from same AS when selecting active BGP paths - `deterministic_med_variable` (String) Variable name -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - `distance_external` (Number) Set administrative distance for external BGP routes - `distance_external_variable` (String) Variable name - `distance_internal` (Number) Set administrative distance for internal BGP routes diff --git a/docs/data-sources/cisco_dhcp_server_feature_template.md b/docs/data-sources/cisco_dhcp_server_feature_template.md index 4240c385..31641dde 100644 --- a/docs/data-sources/cisco_dhcp_server_feature_template.md +++ b/docs/data-sources/cisco_dhcp_server_feature_template.md @@ -33,7 +33,7 @@ data "sdwan_cisco_dhcp_server_feature_template" "example" { - `default_gateway` (String) Set IP address of default gateway - `default_gateway_variable` (String) Variable name - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - `dns_servers` (List of String) Configure one or more DNS server IP addresses - `dns_servers_variable` (String) Variable name - `domain_name` (String) Set domain name client uses to resolve hostnames diff --git a/docs/data-sources/cisco_logging_feature_template.md b/docs/data-sources/cisco_logging_feature_template.md index 550c6654..b14d9bef 100644 --- a/docs/data-sources/cisco_logging_feature_template.md +++ b/docs/data-sources/cisco_logging_feature_template.md @@ -29,7 +29,7 @@ data "sdwan_cisco_logging_feature_template" "example" { ### Read-Only - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - `disk_logging` (Boolean) Enable logging to local disk - `disk_logging_variable` (String) Variable name - `ipv4_servers` (Attributes List) Enable logging to remote server (see [below for nested schema](#nestedatt--ipv4_servers)) diff --git a/docs/data-sources/cisco_ntp_feature_template.md b/docs/data-sources/cisco_ntp_feature_template.md index 4526baaf..262305bc 100644 --- a/docs/data-sources/cisco_ntp_feature_template.md +++ b/docs/data-sources/cisco_ntp_feature_template.md @@ -30,7 +30,7 @@ data "sdwan_cisco_ntp_feature_template" "example" { - `authentication_keys` (Attributes List) Set MD5 authentication key (see [below for nested schema](#nestedatt--authentication_keys)) - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - `master` (Boolean) Configure device as NTP master - `master_source_interface` (String) Set interface for NTP Master - `master_source_interface_variable` (String) Variable name diff --git a/docs/data-sources/cisco_omp_feature_template.md b/docs/data-sources/cisco_omp_feature_template.md index 9b4e96d5..ce619992 100644 --- a/docs/data-sources/cisco_omp_feature_template.md +++ b/docs/data-sources/cisco_omp_feature_template.md @@ -33,7 +33,7 @@ data "sdwan_cisco_omp_feature_template" "example" { - `advertisement_interval` (Number) Set the time between OMP Update packets - `advertisement_interval_variable` (String) Variable name - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - `ecmp_limit` (Number) Set maximum number of OMP paths to install in vEdge route table - `ecmp_limit_variable` (String) Variable name - `eor_timer` (Number) End of RIB timer <1..604800> seconds diff --git a/docs/data-sources/cisco_ospf_feature_template.md b/docs/data-sources/cisco_ospf_feature_template.md index 8fbe489e..527b07fd 100644 --- a/docs/data-sources/cisco_ospf_feature_template.md +++ b/docs/data-sources/cisco_ospf_feature_template.md @@ -41,7 +41,7 @@ data "sdwan_cisco_ospf_feature_template" "example" { - `default_information_originate_metric_type_variable` (String) Variable name - `default_information_originate_metric_variable` (String) Variable name - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - `distance_external` (Number) Set distance for external routes - `distance_external_variable` (String) Variable name - `distance_inter_area` (Number) Set distance for inter-area routes diff --git a/docs/data-sources/cisco_secure_internet_gateway_feature_template.md b/docs/data-sources/cisco_secure_internet_gateway_feature_template.md index c0584911..7c32ceec 100644 --- a/docs/data-sources/cisco_secure_internet_gateway_feature_template.md +++ b/docs/data-sources/cisco_secure_internet_gateway_feature_template.md @@ -29,7 +29,7 @@ data "sdwan_cisco_secure_internet_gateway_feature_template" "example" { ### Read-Only - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - `interfaces` (Attributes List) Interface name: IPsec when present (see [below for nested schema](#nestedatt--interfaces)) - `services` (Attributes List) Configure services (see [below for nested schema](#nestedatt--services)) - `template_type` (String) The template type diff --git a/docs/data-sources/cisco_security_feature_template.md b/docs/data-sources/cisco_security_feature_template.md index 7d61d572..a67bc570 100644 --- a/docs/data-sources/cisco_security_feature_template.md +++ b/docs/data-sources/cisco_security_feature_template.md @@ -31,7 +31,7 @@ data "sdwan_cisco_security_feature_template" "example" { - `authentication_type` (List of String) Set the authentication type for DTLS connections - `authentication_type_variable` (String) Variable name - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - `extended_ar_window` (Number) Extended Anti-Replay Window - `extended_ar_window_variable` (String) Variable name - `integrity_type` (List of String) Set the authentication type for DTLS connections diff --git a/docs/data-sources/cisco_sig_credentials_feature_template.md b/docs/data-sources/cisco_sig_credentials_feature_template.md index da66d4e6..0688de8b 100644 --- a/docs/data-sources/cisco_sig_credentials_feature_template.md +++ b/docs/data-sources/cisco_sig_credentials_feature_template.md @@ -29,7 +29,7 @@ data "sdwan_cisco_sig_credentials_feature_template" "example" { ### Read-Only - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - `template_type` (String) The template type - `umbrella_api_key` (String) API Key - `umbrella_api_key_variable` (String) Variable name diff --git a/docs/data-sources/cisco_snmp_feature_template.md b/docs/data-sources/cisco_snmp_feature_template.md index f9a04c84..7db253b0 100644 --- a/docs/data-sources/cisco_snmp_feature_template.md +++ b/docs/data-sources/cisco_snmp_feature_template.md @@ -32,7 +32,7 @@ data "sdwan_cisco_snmp_feature_template" "example" { - `contact` (String) Set the contact for this managed node - `contact_variable` (String) Variable name - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - `groups` (Attributes List) Configure an SNMP group (see [below for nested schema](#nestedatt--groups)) - `location` (String) Set the physical location of this managed node - `location_variable` (String) Variable name diff --git a/docs/data-sources/cisco_system_feature_template.md b/docs/data-sources/cisco_system_feature_template.md index 261901a3..73b43007 100644 --- a/docs/data-sources/cisco_system_feature_template.md +++ b/docs/data-sources/cisco_system_feature_template.md @@ -43,7 +43,7 @@ data "sdwan_cisco_system_feature_template" "example" { - `description` (String) The description of the feature template - `device_groups` (List of String) Device groups (Use comma(,) for multiple groups) - `device_groups_variable` (String) Variable name -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - `enable_mrf_migration` (String) Enable migration mode to Multi-Region Fabric - `geo_fencing` (Boolean) Enable Geo fencing - `geo_fencing_range` (Number) Set the device’s geo fencing range diff --git a/docs/data-sources/cisco_thousandeyes_feature_template.md b/docs/data-sources/cisco_thousandeyes_feature_template.md index d7279632..31ea8363 100644 --- a/docs/data-sources/cisco_thousandeyes_feature_template.md +++ b/docs/data-sources/cisco_thousandeyes_feature_template.md @@ -29,7 +29,7 @@ data "sdwan_cisco_thousandeyes_feature_template" "example" { ### Read-Only - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - `template_type` (String) The template type - `version` (Number) The version of the feature template - `virtual_applications` (Attributes List) Virtual application Instance (see [below for nested schema](#nestedatt--virtual_applications)) diff --git a/docs/data-sources/cisco_vpn_feature_template.md b/docs/data-sources/cisco_vpn_feature_template.md index 76cb14be..cb054782 100644 --- a/docs/data-sources/cisco_vpn_feature_template.md +++ b/docs/data-sources/cisco_vpn_feature_template.md @@ -29,7 +29,7 @@ data "sdwan_cisco_vpn_feature_template" "example" { ### Read-Only - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - `dns_hosts` (Attributes List) Static DNS mapping (see [below for nested schema](#nestedatt--dns_hosts)) - `dns_ipv4_servers` (Attributes List) DNS (see [below for nested schema](#nestedatt--dns_ipv4_servers)) - `dns_ipv6_servers` (Attributes List) DNS (see [below for nested schema](#nestedatt--dns_ipv6_servers)) diff --git a/docs/data-sources/cisco_vpn_interface_feature_template.md b/docs/data-sources/cisco_vpn_interface_feature_template.md index ae8f04a0..16ccf0bb 100644 --- a/docs/data-sources/cisco_vpn_interface_feature_template.md +++ b/docs/data-sources/cisco_vpn_interface_feature_template.md @@ -46,7 +46,7 @@ data "sdwan_cisco_vpn_interface_feature_template" "example" { - `core_region` (String) Enable core region - `core_region_variable` (String) Variable name - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - `dhcp` (Boolean) Enable DHCP - `dhcp_distance` (Number) Set administrative distance for DHCP default route - `dhcp_distance_variable` (String) Variable name diff --git a/docs/data-sources/cisco_vpn_interface_ipsec_feature_template.md b/docs/data-sources/cisco_vpn_interface_ipsec_feature_template.md index 2aa662b8..f9419170 100644 --- a/docs/data-sources/cisco_vpn_interface_ipsec_feature_template.md +++ b/docs/data-sources/cisco_vpn_interface_ipsec_feature_template.md @@ -37,7 +37,7 @@ data "sdwan_cisco_vpn_interface_ipsec_feature_template" "example" { - `dead_peer_detection_retries` (Number) IKE keepalive retries - `dead_peer_detection_retries_variable` (String) Variable name - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - `ike_ciphersuite` (String) IKE identity the IKE preshared secret belongs to - `ike_ciphersuite_variable` (String) Variable name - `ike_group` (String) IKE Diffie Hellman Groups diff --git a/docs/data-sources/cli_template_feature_template.md b/docs/data-sources/cli_template_feature_template.md index 3eea8684..61562542 100644 --- a/docs/data-sources/cli_template_feature_template.md +++ b/docs/data-sources/cli_template_feature_template.md @@ -30,6 +30,6 @@ data "sdwan_cli_template_feature_template" "example" { - `cli_config` (String) Cli config - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - `template_type` (String) The template type - `version` (Number) The version of the feature template diff --git a/docs/guides/changelog.md b/docs/guides/changelog.md index 8e5f3695..0149cc39 100644 --- a/docs/guides/changelog.md +++ b/docs/guides/changelog.md @@ -11,6 +11,7 @@ description: |- - Add `sdwan_advanced_malware_protection_policy_definition` resource and data source - BREAKING CHANGE: Rename `group` attribute of `sdwan_cedge_aaa_feature_template` resource and data source to `groups` and fix type +- Use type `Set` for `device_types` attributes of feature template resources and data sources ## 0.2.8 diff --git a/docs/resources/cedge_aaa_feature_template.md b/docs/resources/cedge_aaa_feature_template.md index 35e47850..5b75f42e 100644 --- a/docs/resources/cedge_aaa_feature_template.md +++ b/docs/resources/cedge_aaa_feature_template.md @@ -119,7 +119,7 @@ resource "sdwan_cedge_aaa_feature_template" "example" { ### Required - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - Choices: `vedge-C8000V`, `vedge-C8300-1N1S-4T2X`, `vedge-C8300-1N1S-6T`, `vedge-C8300-2N2S-6T`, `vedge-C8300-2N2S-4T2X`, `vedge-C8500-12X4QC`, `vedge-C8500-12X`, `vedge-C8500-20X6C`, `vedge-C8500L-8S4X`, `vedge-C8200-1N-4T`, `vedge-C8200L-1N-4T` - `name` (String) The name of the feature template diff --git a/docs/resources/cedge_global_feature_template.md b/docs/resources/cedge_global_feature_template.md index b2c880d0..622e5335 100644 --- a/docs/resources/cedge_global_feature_template.md +++ b/docs/resources/cedge_global_feature_template.md @@ -51,7 +51,7 @@ resource "sdwan_cedge_global_feature_template" "example" { ### Required - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - Choices: `vedge-C8000V`, `vedge-C8300-1N1S-4T2X`, `vedge-C8300-1N1S-6T`, `vedge-C8300-2N2S-6T`, `vedge-C8300-2N2S-4T2X`, `vedge-C8500-12X4QC`, `vedge-C8500-12X`, `vedge-C8500-20X6C`, `vedge-C8500L-8S4X`, `vedge-C8200-1N-4T`, `vedge-C8200L-1N-4T` - `name` (String) The name of the feature template diff --git a/docs/resources/cisco_banner_feature_template.md b/docs/resources/cisco_banner_feature_template.md index dddb675f..2895e03b 100644 --- a/docs/resources/cisco_banner_feature_template.md +++ b/docs/resources/cisco_banner_feature_template.md @@ -30,7 +30,7 @@ resource "sdwan_cisco_banner_feature_template" "example" { ### Required - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - Choices: `vedge-C8000V`, `vedge-C8300-1N1S-4T2X`, `vedge-C8300-1N1S-6T`, `vedge-C8300-2N2S-6T`, `vedge-C8300-2N2S-4T2X`, `vedge-C8500-12X4QC`, `vedge-C8500-12X`, `vedge-C8500-20X6C`, `vedge-C8500L-8S4X`, `vedge-C8200-1N-4T`, `vedge-C8200L-1N-4T` - `name` (String) The name of the feature template diff --git a/docs/resources/cisco_bfd_feature_template.md b/docs/resources/cisco_bfd_feature_template.md index 8d65e016..0b1cefc0 100644 --- a/docs/resources/cisco_bfd_feature_template.md +++ b/docs/resources/cisco_bfd_feature_template.md @@ -40,7 +40,7 @@ resource "sdwan_cisco_bfd_feature_template" "example" { ### Required - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - Choices: `vedge-C8000V`, `vedge-C8300-1N1S-4T2X`, `vedge-C8300-1N1S-6T`, `vedge-C8300-2N2S-6T`, `vedge-C8300-2N2S-4T2X`, `vedge-C8500-12X4QC`, `vedge-C8500-12X`, `vedge-C8500-20X6C`, `vedge-C8500L-8S4X`, `vedge-C8200-1N-4T`, `vedge-C8200L-1N-4T` - `name` (String) The name of the feature template diff --git a/docs/resources/cisco_bgp_feature_template.md b/docs/resources/cisco_bgp_feature_template.md index 099a1260..b7c1b788 100644 --- a/docs/resources/cisco_bgp_feature_template.md +++ b/docs/resources/cisco_bgp_feature_template.md @@ -187,7 +187,7 @@ resource "sdwan_cisco_bgp_feature_template" "example" { ### Required - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - Choices: `vedge-C8000V`, `vedge-C8300-1N1S-4T2X`, `vedge-C8300-1N1S-6T`, `vedge-C8300-2N2S-6T`, `vedge-C8300-2N2S-4T2X`, `vedge-C8500-12X4QC`, `vedge-C8500-12X`, `vedge-C8500-20X6C`, `vedge-C8500L-8S4X`, `vedge-C8200-1N-4T`, `vedge-C8200L-1N-4T` - `name` (String) The name of the feature template diff --git a/docs/resources/cisco_dhcp_server_feature_template.md b/docs/resources/cisco_dhcp_server_feature_template.md index 587420ea..a1dc42ef 100644 --- a/docs/resources/cisco_dhcp_server_feature_template.md +++ b/docs/resources/cisco_dhcp_server_feature_template.md @@ -49,7 +49,7 @@ resource "sdwan_cisco_dhcp_server_feature_template" "example" { ### Required - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - Choices: `vedge-C8000V`, `vedge-C8300-1N1S-4T2X`, `vedge-C8300-1N1S-6T`, `vedge-C8300-2N2S-6T`, `vedge-C8300-2N2S-4T2X`, `vedge-C8500-12X4QC`, `vedge-C8500-12X`, `vedge-C8500-20X6C`, `vedge-C8500L-8S4X`, `vedge-C8200-1N-4T`, `vedge-C8200L-1N-4T` - `name` (String) The name of the feature template diff --git a/docs/resources/cisco_logging_feature_template.md b/docs/resources/cisco_logging_feature_template.md index ffe8dca8..8e755479 100644 --- a/docs/resources/cisco_logging_feature_template.md +++ b/docs/resources/cisco_logging_feature_template.md @@ -61,7 +61,7 @@ resource "sdwan_cisco_logging_feature_template" "example" { ### Required - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - Choices: `vedge-C8000V`, `vedge-C8300-1N1S-4T2X`, `vedge-C8300-1N1S-6T`, `vedge-C8300-2N2S-6T`, `vedge-C8300-2N2S-4T2X`, `vedge-C8500-12X4QC`, `vedge-C8500-12X`, `vedge-C8500-20X6C`, `vedge-C8500L-8S4X`, `vedge-C8200-1N-4T`, `vedge-C8200L-1N-4T` - `name` (String) The name of the feature template diff --git a/docs/resources/cisco_ntp_feature_template.md b/docs/resources/cisco_ntp_feature_template.md index de03c746..ecfa7132 100644 --- a/docs/resources/cisco_ntp_feature_template.md +++ b/docs/resources/cisco_ntp_feature_template.md @@ -48,7 +48,7 @@ resource "sdwan_cisco_ntp_feature_template" "example" { ### Required - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - Choices: `vedge-C8000V`, `vedge-C8300-1N1S-4T2X`, `vedge-C8300-1N1S-6T`, `vedge-C8300-2N2S-6T`, `vedge-C8300-2N2S-4T2X`, `vedge-C8500-12X4QC`, `vedge-C8500-12X`, `vedge-C8500-20X6C`, `vedge-C8500L-8S4X`, `vedge-C8200-1N-4T`, `vedge-C8200L-1N-4T` - `name` (String) The name of the feature template diff --git a/docs/resources/cisco_omp_feature_template.md b/docs/resources/cisco_omp_feature_template.md index 47ed0103..fdcb556d 100644 --- a/docs/resources/cisco_omp_feature_template.md +++ b/docs/resources/cisco_omp_feature_template.md @@ -52,7 +52,7 @@ resource "sdwan_cisco_omp_feature_template" "example" { ### Required - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - Choices: `vedge-C8000V`, `vedge-C8300-1N1S-4T2X`, `vedge-C8300-1N1S-6T`, `vedge-C8300-2N2S-6T`, `vedge-C8300-2N2S-4T2X`, `vedge-C8500-12X4QC`, `vedge-C8500-12X`, `vedge-C8500-20X6C`, `vedge-C8500L-8S4X`, `vedge-C8200-1N-4T`, `vedge-C8200L-1N-4T` - `name` (String) The name of the feature template diff --git a/docs/resources/cisco_ospf_feature_template.md b/docs/resources/cisco_ospf_feature_template.md index e6970eff..dec56e4b 100644 --- a/docs/resources/cisco_ospf_feature_template.md +++ b/docs/resources/cisco_ospf_feature_template.md @@ -89,7 +89,7 @@ resource "sdwan_cisco_ospf_feature_template" "example" { ### Required - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - Choices: `vedge-C8000V`, `vedge-C8300-1N1S-4T2X`, `vedge-C8300-1N1S-6T`, `vedge-C8300-2N2S-6T`, `vedge-C8300-2N2S-4T2X`, `vedge-C8500-12X4QC`, `vedge-C8500-12X`, `vedge-C8500-20X6C`, `vedge-C8500L-8S4X`, `vedge-C8200-1N-4T`, `vedge-C8200L-1N-4T` - `name` (String) The name of the feature template diff --git a/docs/resources/cisco_secure_internet_gateway_feature_template.md b/docs/resources/cisco_secure_internet_gateway_feature_template.md index 913edd78..f5270908 100644 --- a/docs/resources/cisco_secure_internet_gateway_feature_template.md +++ b/docs/resources/cisco_secure_internet_gateway_feature_template.md @@ -106,7 +106,7 @@ resource "sdwan_cisco_secure_internet_gateway_feature_template" "example" { ### Required - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - Choices: `vedge-C8000V`, `vedge-C8300-1N1S-4T2X`, `vedge-C8300-1N1S-6T`, `vedge-C8300-2N2S-6T`, `vedge-C8300-2N2S-4T2X`, `vedge-C8500-12X4QC`, `vedge-C8500-12X`, `vedge-C8500-20X6C`, `vedge-C8500L-8S4X`, `vedge-C8200-1N-4T`, `vedge-C8200L-1N-4T` - `name` (String) The name of the feature template diff --git a/docs/resources/cisco_security_feature_template.md b/docs/resources/cisco_security_feature_template.md index a03c1897..80cdef9d 100644 --- a/docs/resources/cisco_security_feature_template.md +++ b/docs/resources/cisco_security_feature_template.md @@ -64,7 +64,7 @@ resource "sdwan_cisco_security_feature_template" "example" { ### Required - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - Choices: `vedge-C8000V`, `vedge-C8300-1N1S-4T2X`, `vedge-C8300-1N1S-6T`, `vedge-C8300-2N2S-6T`, `vedge-C8300-2N2S-4T2X`, `vedge-C8500-12X4QC`, `vedge-C8500-12X`, `vedge-C8500-20X6C`, `vedge-C8500L-8S4X`, `vedge-C8200-1N-4T`, `vedge-C8200L-1N-4T` - `name` (String) The name of the feature template diff --git a/docs/resources/cisco_sig_credentials_feature_template.md b/docs/resources/cisco_sig_credentials_feature_template.md index 6232d67d..4e25b8c8 100644 --- a/docs/resources/cisco_sig_credentials_feature_template.md +++ b/docs/resources/cisco_sig_credentials_feature_template.md @@ -39,7 +39,7 @@ resource "sdwan_cisco_sig_credentials_feature_template" "example" { ### Required - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - Choices: `vedge-C8000V`, `vedge-C8300-1N1S-4T2X`, `vedge-C8300-1N1S-6T`, `vedge-C8300-2N2S-6T`, `vedge-C8300-2N2S-4T2X`, `vedge-C8500-12X4QC`, `vedge-C8500-12X`, `vedge-C8500-20X6C`, `vedge-C8500L-8S4X`, `vedge-C8200-1N-4T`, `vedge-C8200L-1N-4T` - `name` (String) The name of the feature template diff --git a/docs/resources/cisco_snmp_feature_template.md b/docs/resources/cisco_snmp_feature_template.md index e246b362..350d61a5 100644 --- a/docs/resources/cisco_snmp_feature_template.md +++ b/docs/resources/cisco_snmp_feature_template.md @@ -76,7 +76,7 @@ resource "sdwan_cisco_snmp_feature_template" "example" { ### Required - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - Choices: `vedge-C8000V`, `vedge-C8300-1N1S-4T2X`, `vedge-C8300-1N1S-6T`, `vedge-C8300-2N2S-6T`, `vedge-C8300-2N2S-4T2X`, `vedge-C8500-12X4QC`, `vedge-C8500-12X`, `vedge-C8500-20X6C`, `vedge-C8500L-8S4X`, `vedge-C8200-1N-4T`, `vedge-C8200L-1N-4T` - `name` (String) The name of the feature template diff --git a/docs/resources/cisco_system_feature_template.md b/docs/resources/cisco_system_feature_template.md index 39fb2041..bb833947 100644 --- a/docs/resources/cisco_system_feature_template.md +++ b/docs/resources/cisco_system_feature_template.md @@ -98,7 +98,7 @@ resource "sdwan_cisco_system_feature_template" "example" { ### Required - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - Choices: `vedge-C8000V`, `vedge-C8300-1N1S-4T2X`, `vedge-C8300-1N1S-6T`, `vedge-C8300-2N2S-6T`, `vedge-C8300-2N2S-4T2X`, `vedge-C8500-12X4QC`, `vedge-C8500-12X`, `vedge-C8500-20X6C`, `vedge-C8500L-8S4X`, `vedge-C8200-1N-4T`, `vedge-C8200L-1N-4T` - `name` (String) The name of the feature template diff --git a/docs/resources/cisco_thousandeyes_feature_template.md b/docs/resources/cisco_thousandeyes_feature_template.md index 265cd767..3ef6f0ae 100644 --- a/docs/resources/cisco_thousandeyes_feature_template.md +++ b/docs/resources/cisco_thousandeyes_feature_template.md @@ -43,7 +43,7 @@ resource "sdwan_cisco_thousandeyes_feature_template" "example" { ### Required - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - Choices: `vedge-C8000V`, `vedge-C8300-1N1S-4T2X`, `vedge-C8300-1N1S-6T`, `vedge-C8300-2N2S-6T`, `vedge-C8300-2N2S-4T2X`, `vedge-C8500-12X4QC`, `vedge-C8500-12X`, `vedge-C8500-20X6C`, `vedge-C8500L-8S4X`, `vedge-C8200-1N-4T`, `vedge-C8200L-1N-4T` - `name` (String) The name of the feature template diff --git a/docs/resources/cisco_vpn_feature_template.md b/docs/resources/cisco_vpn_feature_template.md index c988e582..b4b316e2 100644 --- a/docs/resources/cisco_vpn_feature_template.md +++ b/docs/resources/cisco_vpn_feature_template.md @@ -234,7 +234,7 @@ resource "sdwan_cisco_vpn_feature_template" "example" { ### Required - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - Choices: `vedge-C8000V`, `vedge-C8300-1N1S-4T2X`, `vedge-C8300-1N1S-6T`, `vedge-C8300-2N2S-6T`, `vedge-C8300-2N2S-4T2X`, `vedge-C8500-12X4QC`, `vedge-C8500-12X`, `vedge-C8500-20X6C`, `vedge-C8500L-8S4X`, `vedge-C8200-1N-4T`, `vedge-C8200L-1N-4T` - `name` (String) The name of the feature template diff --git a/docs/resources/cisco_vpn_interface_feature_template.md b/docs/resources/cisco_vpn_interface_feature_template.md index 4ab15533..646f5332 100644 --- a/docs/resources/cisco_vpn_interface_feature_template.md +++ b/docs/resources/cisco_vpn_interface_feature_template.md @@ -236,7 +236,7 @@ resource "sdwan_cisco_vpn_interface_feature_template" "example" { ### Required - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - Choices: `vedge-C8000V`, `vedge-C8300-1N1S-4T2X`, `vedge-C8300-1N1S-6T`, `vedge-C8300-2N2S-6T`, `vedge-C8300-2N2S-4T2X`, `vedge-C8500-12X4QC`, `vedge-C8500-12X`, `vedge-C8500-20X6C`, `vedge-C8500L-8S4X`, `vedge-C8200-1N-4T`, `vedge-C8200L-1N-4T` - `name` (String) The name of the feature template diff --git a/docs/resources/cisco_vpn_interface_ipsec_feature_template.md b/docs/resources/cisco_vpn_interface_ipsec_feature_template.md index 4c554086..24af47f0 100644 --- a/docs/resources/cisco_vpn_interface_ipsec_feature_template.md +++ b/docs/resources/cisco_vpn_interface_ipsec_feature_template.md @@ -55,7 +55,7 @@ resource "sdwan_cisco_vpn_interface_ipsec_feature_template" "example" { ### Required - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - Choices: `vedge-C8000V`, `vedge-C8300-1N1S-4T2X`, `vedge-C8300-1N1S-6T`, `vedge-C8300-2N2S-6T`, `vedge-C8300-2N2S-4T2X`, `vedge-C8500-12X4QC`, `vedge-C8500-12X`, `vedge-C8500-20X6C`, `vedge-C8500L-8S4X`, `vedge-C8200-1N-4T`, `vedge-C8200L-1N-4T` - `name` (String) The name of the feature template diff --git a/docs/resources/cli_template_feature_template.md b/docs/resources/cli_template_feature_template.md index e20351fc..86b9f716 100644 --- a/docs/resources/cli_template_feature_template.md +++ b/docs/resources/cli_template_feature_template.md @@ -29,7 +29,7 @@ resource "sdwan_cli_template_feature_template" "example" { ### Required - `description` (String) The description of the feature template -- `device_types` (List of String) List of supported device types +- `device_types` (Set of String) List of supported device types - Choices: `vedge-C8000V`, `vedge-C8300-1N1S-4T2X`, `vedge-C8300-1N1S-6T`, `vedge-C8300-2N2S-6T`, `vedge-C8300-2N2S-4T2X`, `vedge-C8500-12X4QC`, `vedge-C8500-12X`, `vedge-C8500-20X6C`, `vedge-C8500L-8S4X`, `vedge-C8200-1N-4T`, `vedge-C8200L-1N-4T` - `name` (String) The name of the feature template diff --git a/gen/templates/feature_templates/data_source.go b/gen/templates/feature_templates/data_source.go index 8ca89539..7c4300db 100644 --- a/gen/templates/feature_templates/data_source.go +++ b/gen/templates/feature_templates/data_source.go @@ -81,7 +81,7 @@ func (d *{{camelCase .Name}}FeatureTemplateDataSource) Schema(ctx context.Contex MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/gen/templates/feature_templates/model.go b/gen/templates/feature_templates/model.go index cd34c62b..b4e4883b 100644 --- a/gen/templates/feature_templates/model.go +++ b/gen/templates/feature_templates/model.go @@ -39,7 +39,7 @@ type {{camelCase .Name}} struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` {{- range .Attributes}} {{- if eq .Type "List"}} {{toGoName .TfName}} []{{$name}}{{toGoName .TfName}} `tfsdk:"{{.TfName}}"` @@ -484,9 +484,9 @@ func (data {{camelCase .Name}}) toBody(ctx context.Context) string { func (data *{{camelCase .Name}}) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/gen/templates/feature_templates/resource.go b/gen/templates/feature_templates/resource.go index c5154227..7d2bd63f 100644 --- a/gen/templates/feature_templates/resource.go +++ b/gen/templates/feature_templates/resource.go @@ -87,7 +87,7 @@ func (r *{{camelCase .Name}}FeatureTemplateResource) Schema(ctx context.Context, MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/internal/provider/data_source_sdwan_cedge_aaa_feature_template.go b/internal/provider/data_source_sdwan_cedge_aaa_feature_template.go index 3d70aa0e..c6449876 100644 --- a/internal/provider/data_source_sdwan_cedge_aaa_feature_template.go +++ b/internal/provider/data_source_sdwan_cedge_aaa_feature_template.go @@ -80,7 +80,7 @@ func (d *CEdgeAAAFeatureTemplateDataSource) Schema(ctx context.Context, req data MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/internal/provider/data_source_sdwan_cedge_global_feature_template.go b/internal/provider/data_source_sdwan_cedge_global_feature_template.go index c7aa107e..1ff1ce51 100644 --- a/internal/provider/data_source_sdwan_cedge_global_feature_template.go +++ b/internal/provider/data_source_sdwan_cedge_global_feature_template.go @@ -80,7 +80,7 @@ func (d *CEdgeGlobalFeatureTemplateDataSource) Schema(ctx context.Context, req d MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/internal/provider/data_source_sdwan_cisco_banner_feature_template.go b/internal/provider/data_source_sdwan_cisco_banner_feature_template.go index 3f33961c..79339eec 100644 --- a/internal/provider/data_source_sdwan_cisco_banner_feature_template.go +++ b/internal/provider/data_source_sdwan_cisco_banner_feature_template.go @@ -80,7 +80,7 @@ func (d *CiscoBannerFeatureTemplateDataSource) Schema(ctx context.Context, req d MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/internal/provider/data_source_sdwan_cisco_bfd_feature_template.go b/internal/provider/data_source_sdwan_cisco_bfd_feature_template.go index d6c881b8..f0d09238 100644 --- a/internal/provider/data_source_sdwan_cisco_bfd_feature_template.go +++ b/internal/provider/data_source_sdwan_cisco_bfd_feature_template.go @@ -80,7 +80,7 @@ func (d *CiscoBFDFeatureTemplateDataSource) Schema(ctx context.Context, req data MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/internal/provider/data_source_sdwan_cisco_bgp_feature_template.go b/internal/provider/data_source_sdwan_cisco_bgp_feature_template.go index ffc828af..ae2717d8 100644 --- a/internal/provider/data_source_sdwan_cisco_bgp_feature_template.go +++ b/internal/provider/data_source_sdwan_cisco_bgp_feature_template.go @@ -80,7 +80,7 @@ func (d *CiscoBGPFeatureTemplateDataSource) Schema(ctx context.Context, req data MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/internal/provider/data_source_sdwan_cisco_dhcp_server_feature_template.go b/internal/provider/data_source_sdwan_cisco_dhcp_server_feature_template.go index 1b4211c6..8c7d4ced 100644 --- a/internal/provider/data_source_sdwan_cisco_dhcp_server_feature_template.go +++ b/internal/provider/data_source_sdwan_cisco_dhcp_server_feature_template.go @@ -80,7 +80,7 @@ func (d *CiscoDHCPServerFeatureTemplateDataSource) Schema(ctx context.Context, r MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/internal/provider/data_source_sdwan_cisco_logging_feature_template.go b/internal/provider/data_source_sdwan_cisco_logging_feature_template.go index 456b0584..6772dedf 100644 --- a/internal/provider/data_source_sdwan_cisco_logging_feature_template.go +++ b/internal/provider/data_source_sdwan_cisco_logging_feature_template.go @@ -80,7 +80,7 @@ func (d *CiscoLoggingFeatureTemplateDataSource) Schema(ctx context.Context, req MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/internal/provider/data_source_sdwan_cisco_ntp_feature_template.go b/internal/provider/data_source_sdwan_cisco_ntp_feature_template.go index 4217f12e..7e335e58 100644 --- a/internal/provider/data_source_sdwan_cisco_ntp_feature_template.go +++ b/internal/provider/data_source_sdwan_cisco_ntp_feature_template.go @@ -80,7 +80,7 @@ func (d *CiscoNTPFeatureTemplateDataSource) Schema(ctx context.Context, req data MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/internal/provider/data_source_sdwan_cisco_omp_feature_template.go b/internal/provider/data_source_sdwan_cisco_omp_feature_template.go index 97f332df..ef1d2cc6 100644 --- a/internal/provider/data_source_sdwan_cisco_omp_feature_template.go +++ b/internal/provider/data_source_sdwan_cisco_omp_feature_template.go @@ -80,7 +80,7 @@ func (d *CiscoOMPFeatureTemplateDataSource) Schema(ctx context.Context, req data MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/internal/provider/data_source_sdwan_cisco_ospf_feature_template.go b/internal/provider/data_source_sdwan_cisco_ospf_feature_template.go index f6c7399c..0c96bf2d 100644 --- a/internal/provider/data_source_sdwan_cisco_ospf_feature_template.go +++ b/internal/provider/data_source_sdwan_cisco_ospf_feature_template.go @@ -80,7 +80,7 @@ func (d *CiscoOSPFFeatureTemplateDataSource) Schema(ctx context.Context, req dat MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/internal/provider/data_source_sdwan_cisco_secure_internet_gateway_feature_template.go b/internal/provider/data_source_sdwan_cisco_secure_internet_gateway_feature_template.go index 63fdf6d2..409b1ec0 100644 --- a/internal/provider/data_source_sdwan_cisco_secure_internet_gateway_feature_template.go +++ b/internal/provider/data_source_sdwan_cisco_secure_internet_gateway_feature_template.go @@ -80,7 +80,7 @@ func (d *CiscoSecureInternetGatewayFeatureTemplateDataSource) Schema(ctx context MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/internal/provider/data_source_sdwan_cisco_security_feature_template.go b/internal/provider/data_source_sdwan_cisco_security_feature_template.go index e5ace434..76882d2b 100644 --- a/internal/provider/data_source_sdwan_cisco_security_feature_template.go +++ b/internal/provider/data_source_sdwan_cisco_security_feature_template.go @@ -80,7 +80,7 @@ func (d *CiscoSecurityFeatureTemplateDataSource) Schema(ctx context.Context, req MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/internal/provider/data_source_sdwan_cisco_sig_credentials_feature_template.go b/internal/provider/data_source_sdwan_cisco_sig_credentials_feature_template.go index ff9c02c3..4b14da70 100644 --- a/internal/provider/data_source_sdwan_cisco_sig_credentials_feature_template.go +++ b/internal/provider/data_source_sdwan_cisco_sig_credentials_feature_template.go @@ -80,7 +80,7 @@ func (d *CiscoSIGCredentialsFeatureTemplateDataSource) Schema(ctx context.Contex MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/internal/provider/data_source_sdwan_cisco_snmp_feature_template.go b/internal/provider/data_source_sdwan_cisco_snmp_feature_template.go index 94142913..9076746e 100644 --- a/internal/provider/data_source_sdwan_cisco_snmp_feature_template.go +++ b/internal/provider/data_source_sdwan_cisco_snmp_feature_template.go @@ -80,7 +80,7 @@ func (d *CiscoSNMPFeatureTemplateDataSource) Schema(ctx context.Context, req dat MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/internal/provider/data_source_sdwan_cisco_system_feature_template.go b/internal/provider/data_source_sdwan_cisco_system_feature_template.go index d42084c1..e526cd0c 100644 --- a/internal/provider/data_source_sdwan_cisco_system_feature_template.go +++ b/internal/provider/data_source_sdwan_cisco_system_feature_template.go @@ -80,7 +80,7 @@ func (d *CiscoSystemFeatureTemplateDataSource) Schema(ctx context.Context, req d MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/internal/provider/data_source_sdwan_cisco_thousandeyes_feature_template.go b/internal/provider/data_source_sdwan_cisco_thousandeyes_feature_template.go index e07ccdc9..190e5ca2 100644 --- a/internal/provider/data_source_sdwan_cisco_thousandeyes_feature_template.go +++ b/internal/provider/data_source_sdwan_cisco_thousandeyes_feature_template.go @@ -80,7 +80,7 @@ func (d *CiscoThousandEyesFeatureTemplateDataSource) Schema(ctx context.Context, MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/internal/provider/data_source_sdwan_cisco_vpn_feature_template.go b/internal/provider/data_source_sdwan_cisco_vpn_feature_template.go index 34d7ca74..09422663 100644 --- a/internal/provider/data_source_sdwan_cisco_vpn_feature_template.go +++ b/internal/provider/data_source_sdwan_cisco_vpn_feature_template.go @@ -80,7 +80,7 @@ func (d *CiscoVPNFeatureTemplateDataSource) Schema(ctx context.Context, req data MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/internal/provider/data_source_sdwan_cisco_vpn_interface_feature_template.go b/internal/provider/data_source_sdwan_cisco_vpn_interface_feature_template.go index ae580d7a..ce3a8cae 100644 --- a/internal/provider/data_source_sdwan_cisco_vpn_interface_feature_template.go +++ b/internal/provider/data_source_sdwan_cisco_vpn_interface_feature_template.go @@ -80,7 +80,7 @@ func (d *CiscoVPNInterfaceFeatureTemplateDataSource) Schema(ctx context.Context, MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/internal/provider/data_source_sdwan_cisco_vpn_interface_ipsec_feature_template.go b/internal/provider/data_source_sdwan_cisco_vpn_interface_ipsec_feature_template.go index 8c435edc..e2954f0d 100644 --- a/internal/provider/data_source_sdwan_cisco_vpn_interface_ipsec_feature_template.go +++ b/internal/provider/data_source_sdwan_cisco_vpn_interface_ipsec_feature_template.go @@ -80,7 +80,7 @@ func (d *CiscoVPNInterfaceIPSecFeatureTemplateDataSource) Schema(ctx context.Con MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/internal/provider/data_source_sdwan_cli_template_feature_template.go b/internal/provider/data_source_sdwan_cli_template_feature_template.go index 0545842b..8e05ac39 100644 --- a/internal/provider/data_source_sdwan_cli_template_feature_template.go +++ b/internal/provider/data_source_sdwan_cli_template_feature_template.go @@ -79,7 +79,7 @@ func (d *CLITemplateFeatureTemplateDataSource) Schema(ctx context.Context, req d MarkdownDescription: "The description of the feature template", Computed: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: "List of supported device types", ElementType: types.StringType, Computed: true, diff --git a/internal/provider/helpers/utils.go b/internal/provider/helpers/utils.go index f002fbf0..0d429e18 100644 --- a/internal/provider/helpers/utils.go +++ b/internal/provider/helpers/utils.go @@ -50,6 +50,14 @@ func GetStringList(result []gjson.Result) types.List { return types.ListValueMust(types.StringType, v) } +func GetStringSet(result []gjson.Result) types.Set { + v := make([]attr.Value, len(result)) + for r := range result { + v[r] = types.StringValue(result[r].String()) + } + return types.SetValueMust(types.StringType, v) +} + func WaitForActionToComplete(ctx context.Context, client *sdwan.Client, id string) error { for attempts := 0; ; attempts++ { time.Sleep(5 * time.Second) diff --git a/internal/provider/model_sdwan_cedge_aaa_feature_template.go b/internal/provider/model_sdwan_cedge_aaa_feature_template.go index 4fac9b4e..522c078b 100644 --- a/internal/provider/model_sdwan_cedge_aaa_feature_template.go +++ b/internal/provider/model_sdwan_cedge_aaa_feature_template.go @@ -35,7 +35,7 @@ type CEdgeAAA struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` Dot1xAuthentication types.Bool `tfsdk:"dot1x_authentication"` Dot1xAuthenticationVariable types.String `tfsdk:"dot1x_authentication_variable"` Dot1xAccounting types.Bool `tfsdk:"dot1x_accounting"` @@ -930,9 +930,9 @@ func (data CEdgeAAA) toBody(ctx context.Context) string { func (data *CEdgeAAA) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/internal/provider/model_sdwan_cedge_global_feature_template.go b/internal/provider/model_sdwan_cedge_global_feature_template.go index e84d3549..d1f8231c 100644 --- a/internal/provider/model_sdwan_cedge_global_feature_template.go +++ b/internal/provider/model_sdwan_cedge_global_feature_template.go @@ -35,7 +35,7 @@ type CEdgeGlobal struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` Nat64UdpTimeout types.Int64 `tfsdk:"nat64_udp_timeout"` Nat64UdpTimeoutVariable types.String `tfsdk:"nat64_udp_timeout_variable"` Nat64TcpTimeout types.Int64 `tfsdk:"nat64_tcp_timeout"` @@ -406,9 +406,9 @@ func (data CEdgeGlobal) toBody(ctx context.Context) string { func (data *CEdgeGlobal) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/internal/provider/model_sdwan_cisco_banner_feature_template.go b/internal/provider/model_sdwan_cisco_banner_feature_template.go index fd4cccde..e6faa052 100644 --- a/internal/provider/model_sdwan_cisco_banner_feature_template.go +++ b/internal/provider/model_sdwan_cisco_banner_feature_template.go @@ -34,7 +34,7 @@ type CiscoBanner struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` Login types.String `tfsdk:"login"` LoginVariable types.String `tfsdk:"login_variable"` Motd types.String `tfsdk:"motd"` @@ -90,9 +90,9 @@ func (data CiscoBanner) toBody(ctx context.Context) string { func (data *CiscoBanner) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/internal/provider/model_sdwan_cisco_bfd_feature_template.go b/internal/provider/model_sdwan_cisco_bfd_feature_template.go index 9a95ac01..7cbbacc2 100644 --- a/internal/provider/model_sdwan_cisco_bfd_feature_template.go +++ b/internal/provider/model_sdwan_cisco_bfd_feature_template.go @@ -35,7 +35,7 @@ type CiscoBFD struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` Multiplier types.Int64 `tfsdk:"multiplier"` MultiplierVariable types.String `tfsdk:"multiplier_variable"` PollInterval types.Int64 `tfsdk:"poll_interval"` @@ -209,9 +209,9 @@ func (data CiscoBFD) toBody(ctx context.Context) string { func (data *CiscoBFD) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/internal/provider/model_sdwan_cisco_bgp_feature_template.go b/internal/provider/model_sdwan_cisco_bgp_feature_template.go index 13d45a5b..ae2124e2 100644 --- a/internal/provider/model_sdwan_cisco_bgp_feature_template.go +++ b/internal/provider/model_sdwan_cisco_bgp_feature_template.go @@ -35,7 +35,7 @@ type CiscoBGP struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` AsNumber types.String `tfsdk:"as_number"` AsNumberVariable types.String `tfsdk:"as_number_variable"` Shutdown types.Bool `tfsdk:"shutdown"` @@ -1781,9 +1781,9 @@ func (data CiscoBGP) toBody(ctx context.Context) string { func (data *CiscoBGP) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/internal/provider/model_sdwan_cisco_dhcp_server_feature_template.go b/internal/provider/model_sdwan_cisco_dhcp_server_feature_template.go index 3de69687..91598abb 100644 --- a/internal/provider/model_sdwan_cisco_dhcp_server_feature_template.go +++ b/internal/provider/model_sdwan_cisco_dhcp_server_feature_template.go @@ -34,7 +34,7 @@ type CiscoDHCPServer struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` AddressPool types.String `tfsdk:"address_pool"` AddressPoolVariable types.String `tfsdk:"address_pool_variable"` ExcludeAddresses types.List `tfsdk:"exclude_addresses"` @@ -336,9 +336,9 @@ func (data CiscoDHCPServer) toBody(ctx context.Context) string { func (data *CiscoDHCPServer) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/internal/provider/model_sdwan_cisco_logging_feature_template.go b/internal/provider/model_sdwan_cisco_logging_feature_template.go index e7551356..8bbb080e 100644 --- a/internal/provider/model_sdwan_cisco_logging_feature_template.go +++ b/internal/provider/model_sdwan_cisco_logging_feature_template.go @@ -35,7 +35,7 @@ type CiscoLogging struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` DiskLogging types.Bool `tfsdk:"disk_logging"` DiskLoggingVariable types.String `tfsdk:"disk_logging_variable"` MaxSize types.Int64 `tfsdk:"max_size"` @@ -457,9 +457,9 @@ func (data CiscoLogging) toBody(ctx context.Context) string { func (data *CiscoLogging) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/internal/provider/model_sdwan_cisco_ntp_feature_template.go b/internal/provider/model_sdwan_cisco_ntp_feature_template.go index 5a44a38e..ad3389e9 100644 --- a/internal/provider/model_sdwan_cisco_ntp_feature_template.go +++ b/internal/provider/model_sdwan_cisco_ntp_feature_template.go @@ -35,7 +35,7 @@ type CiscoNTP struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` Master types.Bool `tfsdk:"master"` MasterVariable types.String `tfsdk:"master_variable"` MasterStratum types.Int64 `tfsdk:"master_stratum"` @@ -295,9 +295,9 @@ func (data CiscoNTP) toBody(ctx context.Context) string { func (data *CiscoNTP) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/internal/provider/model_sdwan_cisco_omp_feature_template.go b/internal/provider/model_sdwan_cisco_omp_feature_template.go index a9c32ca8..74f4f294 100644 --- a/internal/provider/model_sdwan_cisco_omp_feature_template.go +++ b/internal/provider/model_sdwan_cisco_omp_feature_template.go @@ -35,7 +35,7 @@ type CiscoOMP struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` GracefulRestart types.Bool `tfsdk:"graceful_restart"` GracefulRestartVariable types.String `tfsdk:"graceful_restart_variable"` OverlayAs types.Int64 `tfsdk:"overlay_as"` @@ -338,9 +338,9 @@ func (data CiscoOMP) toBody(ctx context.Context) string { func (data *CiscoOMP) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/internal/provider/model_sdwan_cisco_ospf_feature_template.go b/internal/provider/model_sdwan_cisco_ospf_feature_template.go index aa2b5197..bea595cf 100644 --- a/internal/provider/model_sdwan_cisco_ospf_feature_template.go +++ b/internal/provider/model_sdwan_cisco_ospf_feature_template.go @@ -35,7 +35,7 @@ type CiscoOSPF struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` RouterId types.String `tfsdk:"router_id"` RouterIdVariable types.String `tfsdk:"router_id_variable"` AutoCostReferenceBandwidth types.Int64 `tfsdk:"auto_cost_reference_bandwidth"` @@ -763,9 +763,9 @@ func (data CiscoOSPF) toBody(ctx context.Context) string { func (data *CiscoOSPF) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/internal/provider/model_sdwan_cisco_secure_internet_gateway_feature_template.go b/internal/provider/model_sdwan_cisco_secure_internet_gateway_feature_template.go index 52a04fc5..fb69d22a 100644 --- a/internal/provider/model_sdwan_cisco_secure_internet_gateway_feature_template.go +++ b/internal/provider/model_sdwan_cisco_secure_internet_gateway_feature_template.go @@ -35,7 +35,7 @@ type CiscoSecureInternetGateway struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` VpnId types.Int64 `tfsdk:"vpn_id"` Interfaces []CiscoSecureInternetGatewayInterfaces `tfsdk:"interfaces"` Services []CiscoSecureInternetGatewayServices `tfsdk:"services"` @@ -931,9 +931,9 @@ func (data CiscoSecureInternetGateway) toBody(ctx context.Context) string { func (data *CiscoSecureInternetGateway) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/internal/provider/model_sdwan_cisco_security_feature_template.go b/internal/provider/model_sdwan_cisco_security_feature_template.go index e34aaff2..54979259 100644 --- a/internal/provider/model_sdwan_cisco_security_feature_template.go +++ b/internal/provider/model_sdwan_cisco_security_feature_template.go @@ -35,7 +35,7 @@ type CiscoSecurity struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` RekeyInterval types.Int64 `tfsdk:"rekey_interval"` RekeyIntervalVariable types.String `tfsdk:"rekey_interval_variable"` ReplayWindow types.String `tfsdk:"replay_window"` @@ -470,9 +470,9 @@ func (data CiscoSecurity) toBody(ctx context.Context) string { func (data *CiscoSecurity) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/internal/provider/model_sdwan_cisco_sig_credentials_feature_template.go b/internal/provider/model_sdwan_cisco_sig_credentials_feature_template.go index 27873097..571ea1eb 100644 --- a/internal/provider/model_sdwan_cisco_sig_credentials_feature_template.go +++ b/internal/provider/model_sdwan_cisco_sig_credentials_feature_template.go @@ -34,7 +34,7 @@ type CiscoSIGCredentials struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` ZscalerOrganization types.String `tfsdk:"zscaler_organization"` ZscalerOrganizationVariable types.String `tfsdk:"zscaler_organization_variable"` ZscalerPartnerBaseUri types.String `tfsdk:"zscaler_partner_base_uri"` @@ -214,9 +214,9 @@ func (data CiscoSIGCredentials) toBody(ctx context.Context) string { func (data *CiscoSIGCredentials) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/internal/provider/model_sdwan_cisco_snmp_feature_template.go b/internal/provider/model_sdwan_cisco_snmp_feature_template.go index e0056e76..4e49d446 100644 --- a/internal/provider/model_sdwan_cisco_snmp_feature_template.go +++ b/internal/provider/model_sdwan_cisco_snmp_feature_template.go @@ -35,7 +35,7 @@ type CiscoSNMP struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` Shutdown types.Bool `tfsdk:"shutdown"` ShutdownVariable types.String `tfsdk:"shutdown_variable"` Contact types.String `tfsdk:"contact"` @@ -531,9 +531,9 @@ func (data CiscoSNMP) toBody(ctx context.Context) string { func (data *CiscoSNMP) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/internal/provider/model_sdwan_cisco_system_feature_template.go b/internal/provider/model_sdwan_cisco_system_feature_template.go index 99e263ca..6c2ccaf9 100644 --- a/internal/provider/model_sdwan_cisco_system_feature_template.go +++ b/internal/provider/model_sdwan_cisco_system_feature_template.go @@ -35,7 +35,7 @@ type CiscoSystem struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` Timezone types.String `tfsdk:"timezone"` TimezoneVariable types.String `tfsdk:"timezone_variable"` Hostname types.String `tfsdk:"hostname"` @@ -978,9 +978,9 @@ func (data CiscoSystem) toBody(ctx context.Context) string { func (data *CiscoSystem) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/internal/provider/model_sdwan_cisco_thousandeyes_feature_template.go b/internal/provider/model_sdwan_cisco_thousandeyes_feature_template.go index ba6cfdda..8adb5710 100644 --- a/internal/provider/model_sdwan_cisco_thousandeyes_feature_template.go +++ b/internal/provider/model_sdwan_cisco_thousandeyes_feature_template.go @@ -34,7 +34,7 @@ type CiscoThousandEyes struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` VirtualApplications []CiscoThousandEyesVirtualApplications `tfsdk:"virtual_applications"` } @@ -248,9 +248,9 @@ func (data CiscoThousandEyes) toBody(ctx context.Context) string { func (data *CiscoThousandEyes) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/internal/provider/model_sdwan_cisco_vpn_feature_template.go b/internal/provider/model_sdwan_cisco_vpn_feature_template.go index 8fa6e0e9..df751e2a 100644 --- a/internal/provider/model_sdwan_cisco_vpn_feature_template.go +++ b/internal/provider/model_sdwan_cisco_vpn_feature_template.go @@ -35,7 +35,7 @@ type CiscoVPN struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` VpnId types.Int64 `tfsdk:"vpn_id"` VpnName types.String `tfsdk:"vpn_name"` VpnNameVariable types.String `tfsdk:"vpn_name_variable"` @@ -2104,9 +2104,9 @@ func (data CiscoVPN) toBody(ctx context.Context) string { func (data *CiscoVPN) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/internal/provider/model_sdwan_cisco_vpn_interface_feature_template.go b/internal/provider/model_sdwan_cisco_vpn_interface_feature_template.go index d865a802..ef1ec479 100644 --- a/internal/provider/model_sdwan_cisco_vpn_interface_feature_template.go +++ b/internal/provider/model_sdwan_cisco_vpn_interface_feature_template.go @@ -35,7 +35,7 @@ type CiscoVPNInterface struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` InterfaceName types.String `tfsdk:"interface_name"` InterfaceNameVariable types.String `tfsdk:"interface_name_variable"` InterfaceDescription types.String `tfsdk:"interface_description"` @@ -2491,9 +2491,9 @@ func (data CiscoVPNInterface) toBody(ctx context.Context) string { func (data *CiscoVPNInterface) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/internal/provider/model_sdwan_cisco_vpn_interface_ipsec_feature_template.go b/internal/provider/model_sdwan_cisco_vpn_interface_ipsec_feature_template.go index 6dc3c0ea..c9b4ac13 100644 --- a/internal/provider/model_sdwan_cisco_vpn_interface_ipsec_feature_template.go +++ b/internal/provider/model_sdwan_cisco_vpn_interface_ipsec_feature_template.go @@ -35,7 +35,7 @@ type CiscoVPNInterfaceIPSec struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` InterfaceName types.String `tfsdk:"interface_name"` InterfaceNameVariable types.String `tfsdk:"interface_name_variable"` Shutdown types.Bool `tfsdk:"shutdown"` @@ -450,9 +450,9 @@ func (data CiscoVPNInterfaceIPSec) toBody(ctx context.Context) string { func (data *CiscoVPNInterfaceIPSec) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/internal/provider/model_sdwan_cli_template_feature_template.go b/internal/provider/model_sdwan_cli_template_feature_template.go index a763cce0..9550dbf1 100644 --- a/internal/provider/model_sdwan_cli_template_feature_template.go +++ b/internal/provider/model_sdwan_cli_template_feature_template.go @@ -34,7 +34,7 @@ type CLITemplate struct { TemplateType types.String `tfsdk:"template_type"` Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` - DeviceTypes types.List `tfsdk:"device_types"` + DeviceTypes types.Set `tfsdk:"device_types"` CliConfig types.String `tfsdk:"cli_config"` } @@ -67,9 +67,9 @@ func (data CLITemplate) toBody(ctx context.Context) string { func (data *CLITemplate) fromBody(ctx context.Context, res gjson.Result) { if value := res.Get("deviceType"); value.Exists() { - data.DeviceTypes = helpers.GetStringList(value.Array()) + data.DeviceTypes = helpers.GetStringSet(value.Array()) } else { - data.DeviceTypes = types.ListNull(types.StringType) + data.DeviceTypes = types.SetNull(types.StringType) } if value := res.Get("templateDescription"); value.Exists() && value.String() != "" { data.Description = types.StringValue(value.String()) diff --git a/internal/provider/resource_sdwan_cedge_aaa_feature_template.go b/internal/provider/resource_sdwan_cedge_aaa_feature_template.go index 6404139a..a2927369 100644 --- a/internal/provider/resource_sdwan_cedge_aaa_feature_template.go +++ b/internal/provider/resource_sdwan_cedge_aaa_feature_template.go @@ -87,7 +87,7 @@ func (r *CEdgeAAAFeatureTemplateResource) Schema(ctx context.Context, req resour MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/internal/provider/resource_sdwan_cedge_global_feature_template.go b/internal/provider/resource_sdwan_cedge_global_feature_template.go index e9f0eee4..df007a80 100644 --- a/internal/provider/resource_sdwan_cedge_global_feature_template.go +++ b/internal/provider/resource_sdwan_cedge_global_feature_template.go @@ -87,7 +87,7 @@ func (r *CEdgeGlobalFeatureTemplateResource) Schema(ctx context.Context, req res MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/internal/provider/resource_sdwan_cisco_banner_feature_template.go b/internal/provider/resource_sdwan_cisco_banner_feature_template.go index befa561c..f38b725b 100644 --- a/internal/provider/resource_sdwan_cisco_banner_feature_template.go +++ b/internal/provider/resource_sdwan_cisco_banner_feature_template.go @@ -86,7 +86,7 @@ func (r *CiscoBannerFeatureTemplateResource) Schema(ctx context.Context, req res MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/internal/provider/resource_sdwan_cisco_bfd_feature_template.go b/internal/provider/resource_sdwan_cisco_bfd_feature_template.go index dac8c60f..00560cd2 100644 --- a/internal/provider/resource_sdwan_cisco_bfd_feature_template.go +++ b/internal/provider/resource_sdwan_cisco_bfd_feature_template.go @@ -87,7 +87,7 @@ func (r *CiscoBFDFeatureTemplateResource) Schema(ctx context.Context, req resour MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/internal/provider/resource_sdwan_cisco_bgp_feature_template.go b/internal/provider/resource_sdwan_cisco_bgp_feature_template.go index 5f9583c3..49f86445 100644 --- a/internal/provider/resource_sdwan_cisco_bgp_feature_template.go +++ b/internal/provider/resource_sdwan_cisco_bgp_feature_template.go @@ -87,7 +87,7 @@ func (r *CiscoBGPFeatureTemplateResource) Schema(ctx context.Context, req resour MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/internal/provider/resource_sdwan_cisco_dhcp_server_feature_template.go b/internal/provider/resource_sdwan_cisco_dhcp_server_feature_template.go index f08c3847..15780273 100644 --- a/internal/provider/resource_sdwan_cisco_dhcp_server_feature_template.go +++ b/internal/provider/resource_sdwan_cisco_dhcp_server_feature_template.go @@ -87,7 +87,7 @@ func (r *CiscoDHCPServerFeatureTemplateResource) Schema(ctx context.Context, req MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/internal/provider/resource_sdwan_cisco_logging_feature_template.go b/internal/provider/resource_sdwan_cisco_logging_feature_template.go index 8c1f9b68..611fbf89 100644 --- a/internal/provider/resource_sdwan_cisco_logging_feature_template.go +++ b/internal/provider/resource_sdwan_cisco_logging_feature_template.go @@ -87,7 +87,7 @@ func (r *CiscoLoggingFeatureTemplateResource) Schema(ctx context.Context, req re MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/internal/provider/resource_sdwan_cisco_ntp_feature_template.go b/internal/provider/resource_sdwan_cisco_ntp_feature_template.go index 48ca92bb..4dfa67d8 100644 --- a/internal/provider/resource_sdwan_cisco_ntp_feature_template.go +++ b/internal/provider/resource_sdwan_cisco_ntp_feature_template.go @@ -87,7 +87,7 @@ func (r *CiscoNTPFeatureTemplateResource) Schema(ctx context.Context, req resour MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/internal/provider/resource_sdwan_cisco_omp_feature_template.go b/internal/provider/resource_sdwan_cisco_omp_feature_template.go index 0e537416..6b1d154f 100644 --- a/internal/provider/resource_sdwan_cisco_omp_feature_template.go +++ b/internal/provider/resource_sdwan_cisco_omp_feature_template.go @@ -87,7 +87,7 @@ func (r *CiscoOMPFeatureTemplateResource) Schema(ctx context.Context, req resour MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/internal/provider/resource_sdwan_cisco_ospf_feature_template.go b/internal/provider/resource_sdwan_cisco_ospf_feature_template.go index 9ed078d9..f2c83ee6 100644 --- a/internal/provider/resource_sdwan_cisco_ospf_feature_template.go +++ b/internal/provider/resource_sdwan_cisco_ospf_feature_template.go @@ -87,7 +87,7 @@ func (r *CiscoOSPFFeatureTemplateResource) Schema(ctx context.Context, req resou MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/internal/provider/resource_sdwan_cisco_secure_internet_gateway_feature_template.go b/internal/provider/resource_sdwan_cisco_secure_internet_gateway_feature_template.go index 871154c8..ba4f0c91 100644 --- a/internal/provider/resource_sdwan_cisco_secure_internet_gateway_feature_template.go +++ b/internal/provider/resource_sdwan_cisco_secure_internet_gateway_feature_template.go @@ -87,7 +87,7 @@ func (r *CiscoSecureInternetGatewayFeatureTemplateResource) Schema(ctx context.C MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/internal/provider/resource_sdwan_cisco_security_feature_template.go b/internal/provider/resource_sdwan_cisco_security_feature_template.go index 5d137156..7e84202c 100644 --- a/internal/provider/resource_sdwan_cisco_security_feature_template.go +++ b/internal/provider/resource_sdwan_cisco_security_feature_template.go @@ -87,7 +87,7 @@ func (r *CiscoSecurityFeatureTemplateResource) Schema(ctx context.Context, req r MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/internal/provider/resource_sdwan_cisco_sig_credentials_feature_template.go b/internal/provider/resource_sdwan_cisco_sig_credentials_feature_template.go index c0812b91..3293ad0e 100644 --- a/internal/provider/resource_sdwan_cisco_sig_credentials_feature_template.go +++ b/internal/provider/resource_sdwan_cisco_sig_credentials_feature_template.go @@ -86,7 +86,7 @@ func (r *CiscoSIGCredentialsFeatureTemplateResource) Schema(ctx context.Context, MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/internal/provider/resource_sdwan_cisco_snmp_feature_template.go b/internal/provider/resource_sdwan_cisco_snmp_feature_template.go index b896fb98..eefd33bb 100644 --- a/internal/provider/resource_sdwan_cisco_snmp_feature_template.go +++ b/internal/provider/resource_sdwan_cisco_snmp_feature_template.go @@ -87,7 +87,7 @@ func (r *CiscoSNMPFeatureTemplateResource) Schema(ctx context.Context, req resou MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/internal/provider/resource_sdwan_cisco_system_feature_template.go b/internal/provider/resource_sdwan_cisco_system_feature_template.go index 292d4ba9..6f66f3d4 100644 --- a/internal/provider/resource_sdwan_cisco_system_feature_template.go +++ b/internal/provider/resource_sdwan_cisco_system_feature_template.go @@ -88,7 +88,7 @@ func (r *CiscoSystemFeatureTemplateResource) Schema(ctx context.Context, req res MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/internal/provider/resource_sdwan_cisco_thousandeyes_feature_template.go b/internal/provider/resource_sdwan_cisco_thousandeyes_feature_template.go index 8245260d..e36cb609 100644 --- a/internal/provider/resource_sdwan_cisco_thousandeyes_feature_template.go +++ b/internal/provider/resource_sdwan_cisco_thousandeyes_feature_template.go @@ -87,7 +87,7 @@ func (r *CiscoThousandEyesFeatureTemplateResource) Schema(ctx context.Context, r MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/internal/provider/resource_sdwan_cisco_vpn_feature_template.go b/internal/provider/resource_sdwan_cisco_vpn_feature_template.go index be8d11c9..d1baf217 100644 --- a/internal/provider/resource_sdwan_cisco_vpn_feature_template.go +++ b/internal/provider/resource_sdwan_cisco_vpn_feature_template.go @@ -87,7 +87,7 @@ func (r *CiscoVPNFeatureTemplateResource) Schema(ctx context.Context, req resour MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/internal/provider/resource_sdwan_cisco_vpn_interface_feature_template.go b/internal/provider/resource_sdwan_cisco_vpn_interface_feature_template.go index e943eef6..b0d3d2e7 100644 --- a/internal/provider/resource_sdwan_cisco_vpn_interface_feature_template.go +++ b/internal/provider/resource_sdwan_cisco_vpn_interface_feature_template.go @@ -87,7 +87,7 @@ func (r *CiscoVPNInterfaceFeatureTemplateResource) Schema(ctx context.Context, r MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/internal/provider/resource_sdwan_cisco_vpn_interface_ipsec_feature_template.go b/internal/provider/resource_sdwan_cisco_vpn_interface_ipsec_feature_template.go index 5f52a8c2..519e3d9c 100644 --- a/internal/provider/resource_sdwan_cisco_vpn_interface_ipsec_feature_template.go +++ b/internal/provider/resource_sdwan_cisco_vpn_interface_ipsec_feature_template.go @@ -87,7 +87,7 @@ func (r *CiscoVPNInterfaceIPSecFeatureTemplateResource) Schema(ctx context.Conte MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/internal/provider/resource_sdwan_cli_template_feature_template.go b/internal/provider/resource_sdwan_cli_template_feature_template.go index 999dec03..7e3f006e 100644 --- a/internal/provider/resource_sdwan_cli_template_feature_template.go +++ b/internal/provider/resource_sdwan_cli_template_feature_template.go @@ -84,7 +84,7 @@ func (r *CLITemplateFeatureTemplateResource) Schema(ctx context.Context, req res MarkdownDescription: "The description of the feature template", Required: true, }, - "device_types": schema.ListAttribute{ + "device_types": schema.SetAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of supported device types").AddStringEnumDescription("vedge-C8000V", "vedge-C8300-1N1S-4T2X", "vedge-C8300-1N1S-6T", "vedge-C8300-2N2S-6T", "vedge-C8300-2N2S-4T2X", "vedge-C8500-12X4QC", "vedge-C8500-12X", "vedge-C8500-20X6C", "vedge-C8500L-8S4X", "vedge-C8200-1N-4T", "vedge-C8200L-1N-4T").String, ElementType: types.StringType, Required: true, diff --git a/templates/guides/changelog.md.tmpl b/templates/guides/changelog.md.tmpl index 8e5f3695..0149cc39 100644 --- a/templates/guides/changelog.md.tmpl +++ b/templates/guides/changelog.md.tmpl @@ -11,6 +11,7 @@ description: |- - Add `sdwan_advanced_malware_protection_policy_definition` resource and data source - BREAKING CHANGE: Rename `group` attribute of `sdwan_cedge_aaa_feature_template` resource and data source to `groups` and fix type +- Use type `Set` for `device_types` attributes of feature template resources and data sources ## 0.2.8