diff --git a/docs/data-sources/wireless_settings.md b/docs/data-sources/wireless_settings.md index 32bea7d..67e7dc6 100644 --- a/docs/data-sources/wireless_settings.md +++ b/docs/data-sources/wireless_settings.md @@ -14,7 +14,6 @@ This data source can read the `Wireless settings` configuration. ```terraform data "meraki_wireless_settings" "example" { - id = "12345678" network_id = "L_123456" } ``` diff --git a/docs/data-sources/wireless_ssid.md b/docs/data-sources/wireless_ssid.md index e7c95e8..7c4bfde 100644 --- a/docs/data-sources/wireless_ssid.md +++ b/docs/data-sources/wireless_ssid.md @@ -111,7 +111,6 @@ data "meraki_wireless_ssid" "example" { - `wpa_encryption_mode` (String) The types of WPA encryption. (`WPA1 only`, `WPA1 and WPA2`, `WPA2 only`, `WPA3 Transition Mode`, `WPA3 only` or `WPA3 192-bit Security`) - ### Nested Schema for `active_directory_servers` Read-Only: @@ -119,8 +118,8 @@ Read-Only: - `host` (String) IP address (or FQDN) of your Active Directory server. - `port` (Number) (Optional) UDP port the Active Directory server listens on. By default, uses port 3268. - + ### Nested Schema for `ap_tags_and_vlan_ids` Read-Only: @@ -128,8 +127,8 @@ Read-Only: - `tags` (List of String) Array of AP tags - `vlan_id` (Number) Numerical identifier that is assigned to the VLAN - + ### Nested Schema for `ldap_servers` Read-Only: @@ -137,8 +136,8 @@ Read-Only: - `host` (String) IP address (or FQDN) of your LDAP server. - `port` (Number) UDP port the LDAP server listens on. - + ### Nested Schema for `named_vlans_tagging_by_ap_tags` Read-Only: @@ -146,8 +145,8 @@ Read-Only: - `tags` (List of String) List of AP tags. - `vlan_name` (String) VLAN name that will be used to tag traffic. - + ### Nested Schema for `radius_accounting_servers` Read-Only: @@ -158,8 +157,8 @@ Read-Only: - `radsec_enabled` (Boolean) Use RADSEC (TLS over TCP) to connect to this RADIUS accounting server. Requires radiusProxyEnabled. - `secret` (String) Shared key used to authenticate messages between the APs and RADIUS server - + ### Nested Schema for `radius_servers` Read-Only: diff --git a/docs/resources/wireless_settings.md b/docs/resources/wireless_settings.md index ecaa5b2..583bb71 100644 --- a/docs/resources/wireless_settings.md +++ b/docs/resources/wireless_settings.md @@ -52,5 +52,5 @@ resource "meraki_wireless_settings" "example" { Import is supported using the following syntax: ```shell -terraform import meraki_wireless_settings.example "," +terraform import meraki_wireless_settings.example "" ``` diff --git a/docs/resources/wireless_ssid.md b/docs/resources/wireless_ssid.md index 16cdc7c..f50d878 100644 --- a/docs/resources/wireless_ssid.md +++ b/docs/resources/wireless_ssid.md @@ -62,7 +62,7 @@ resource "meraki_wireless_ssid" "example" { - `adult_content_filtering_enabled` (Boolean) Boolean indicating whether or not adult content will be blocked - `ap_tags_and_vlan_ids` (Attributes List) The list of tags and VLAN IDs used for VLAN tagging. This param is only valid when the ipAssignmentMode is `Bridge mode` or `Layer 3 roaming` (see [below for nested schema](#nestedatt--ap_tags_and_vlan_ids)) - `auth_mode` (String) The association control method for the SSID (`open`, `open-enhanced`, `psk`, `open-with-radius`, `open-with-nac`, `8021x-meraki`, `8021x-nac`, `8021x-radius`, `8021x-google`, `8021x-entra`, `8021x-localradius`, `ipsk-with-radius`, `ipsk-without-radius` or `ipsk-with-nac`) - - Choices: `8021x-entra`, `8021x-google`, `8021x-localradius`, `8021x-meraki`, `8021x-nac`, `8021x-radius`, `ipsk-with-nac`, `ipsk-with-radius`, `ipsk-without-radius`, `open`, `open-enhanced`, `open-with-nac`, `open-with-radius`, `psk` + - Choices: `8021x-entra`, `8021x-google`, `8021x-localradius`, `8021x-meraki`, `8021x-nac`, `8021x-radius`, `ipsk-with-nac`, `ipsk-with-radius`, `ipsk-without-radius`, `open`, `open-enhanced`, `open-with-nac`, `open-with-radius`, `psk` - `availability_tags` (List of String) Accepts a list of tags for this SSID. If availableOnAllAps is false, then the SSID will only be broadcast by APs with tags matching any of the tags in this list. - `available_on_all_aps` (Boolean) Boolean indicating whether all APs should broadcast the SSID or if it should be restricted to APs matching any availability tags. Can only be false if the SSID has availability tags. - `band_selection` (String) The client-serving radio frequencies of this SSID in the default indoor RF profile. (`Dual band operation`, `5 GHz band only` or `Dual band operation with Band Steering`) @@ -77,9 +77,9 @@ resource "meraki_wireless_ssid" "example" { - `dot11w_required` (Boolean) (Optional) Whether 802.11w is required or not. - `enabled` (Boolean) Whether or not the SSID is enabled - `encryption_mode` (String) The psk encryption mode for the SSID (`wep` or `wpa`). This param is only valid if the authMode is `psk` - - Choices: `open`, `wep`, `wpa`, `wpa-eap` + - Choices: `open`, `wep`, `wpa`, `wpa-eap` - `enterprise_admin_access` (String) Whether or not an SSID is accessible by `enterprise` administrators (`access disabled` or `access enabled`) - - Choices: `access disabled`, `access enabled` + - Choices: `access disabled`, `access enabled` - `gre_concentrator_host` (String) The EoGRE concentrator's IP or FQDN. This param is required when ipAssignmentMode is `Ethernet over GRE`. - `gre_key` (Number) Optional numerical identifier that will add the GRE key field to the GRE header. Used to identify an individual traffic flow within a tunnel. - `ip_assignment_mode` (String) The client IP assignment mode (`NAT mode`, `Bridge mode`, `Layer 3 roaming`, `Ethernet over GRE`, `Layer 3 roaming with a concentrator` or `VPN`) @@ -113,17 +113,17 @@ resource "meraki_wireless_ssid" "example" { - `radius_accounting_interim_interval` (Number) The interval (in seconds) in which accounting information is updated and sent to the RADIUS accounting server. - `radius_accounting_servers` (Attributes List) The RADIUS accounting 802.1X servers to be used for authentication. This param is only valid if the authMode is `open-with-radius`, `8021x-radius` or `ipsk-with-radius` and radiusAccountingEnabled is `true` (see [below for nested schema](#nestedatt--radius_accounting_servers)) - `radius_attribute_for_group_policies` (String) Specify the RADIUS attribute used to look up group policies (`Filter-Id`, `Reply-Message`, `Airespace-ACL-Name` or `Aruba-User-Role`). Access points must receive this attribute in the RADIUS Access-Accept message - - Choices: `Airespace-ACL-Name`, `Aruba-User-Role`, `Filter-Id`, `Reply-Message` + - Choices: `Airespace-ACL-Name`, `Aruba-User-Role`, `Filter-Id`, `Reply-Message` - `radius_authentication_nas_id` (String) The template of the NAS identifier to be used for RADIUS authentication (ex. $NODE_MAC$:$VAP_NUM$). - `radius_called_station_id` (String) The template of the called station identifier to be used for RADIUS (ex. $NODE_MAC$:$VAP_NUM$). - `radius_coa_enabled` (Boolean) If true, Meraki devices will act as a RADIUS Dynamic Authorization Server and will respond to RADIUS Change-of-Authorization and Disconnect messages sent by the RADIUS server. - `radius_failover_policy` (String) This policy determines how authentication requests should be handled in the event that all of the configured RADIUS servers are unreachable (`Deny access` or `Allow access`) - - Choices: `Allow access`, `Deny access` + - Choices: `Allow access`, `Deny access` - `radius_fallback_enabled` (Boolean) Whether or not higher priority RADIUS servers should be retried after 60 seconds. - `radius_guest_vlan_enabled` (Boolean) Whether or not RADIUS Guest VLAN is enabled. This param is only valid if the authMode is `open-with-radius` and addressing mode is not set to `isolated` or `nat` mode - `radius_guest_vlan_id` (Number) VLAN ID of the RADIUS Guest VLAN. This param is only valid if the authMode is `open-with-radius` and addressing mode is not set to `isolated` or `nat` mode - `radius_load_balancing_policy` (String) This policy determines which RADIUS server will be contacted first in an authentication attempt and the ordering of any necessary retry attempts (`Strict priority order` or `Round robin`) - - Choices: `Round robin`, `Strict priority order` + - Choices: `Round robin`, `Strict priority order` - `radius_override` (Boolean) If true, the RADIUS response can override VLAN tag. This is not valid when ipAssignmentMode is `NAT mode`. - `radius_proxy_enabled` (Boolean) If true, Meraki devices will proxy RADIUS messages through the Meraki cloud to the configured RADIUS auth and accounting servers. - `radius_server_attempts_limit` (Number) The maximum number of transmit attempts after which a RADIUS server is failed over (must be between 1-5). @@ -134,21 +134,20 @@ resource "meraki_wireless_ssid" "example" { - `speed_burst_enabled` (Boolean) Boolean indicating whether or not to allow users to temporarily exceed the bandwidth limit for short periods while still keeping them under the bandwidth limit over time. - `splash_guest_sponsor_domains` (List of String) Array of valid sponsor email domains for sponsored guest splash type. - `splash_page` (String) The type of splash page for the SSID (`None`, `Click-through splash page`, `Billing`, `Password-protected with Meraki RADIUS`, `Password-protected with custom RADIUS`, `Password-protected with Active Directory`, `Password-protected with LDAP`, `SMS authentication`, `Systems Manager Sentry`, `Facebook Wi-Fi`, `Google OAuth`, `Microsoft Entra ID`, `Sponsored guest`, `Cisco ISE` or `Google Apps domain`). This attribute is not supported for template children. - - Choices: `Billing`, `Cisco ISE`, `Click-through splash page`, `Facebook Wi-Fi`, `Google Apps domain`, `Google OAuth`, `Microsoft Entra ID`, `None`, `Password-protected with Active Directory`, `Password-protected with LDAP`, `Password-protected with Meraki RADIUS`, `Password-protected with custom RADIUS`, `SMS authentication`, `Sponsored guest`, `Systems Manager Sentry` + - Choices: `Billing`, `Cisco ISE`, `Click-through splash page`, `Facebook Wi-Fi`, `Google Apps domain`, `Google OAuth`, `Microsoft Entra ID`, `None`, `Password-protected with Active Directory`, `Password-protected with LDAP`, `Password-protected with Meraki RADIUS`, `Password-protected with custom RADIUS`, `SMS authentication`, `Sponsored guest`, `Systems Manager Sentry` - `use_vlan_tagging` (Boolean) Whether or not traffic should be directed to use specific VLANs. This param is only valid if the ipAssignmentMode is `Bridge mode` or `Layer 3 roaming` - `visible` (Boolean) Boolean indicating whether APs should advertise or hide this SSID. APs will only broadcast this SSID if set to true - `vlan_id` (Number) The VLAN ID used for VLAN tagging. This param is only valid when the ipAssignmentMode is `Layer 3 roaming with a concentrator` or `VPN` - `walled_garden_enabled` (Boolean) Allow access to a configurable list of IP ranges, which users may access prior to sign-on. - `walled_garden_ranges` (List of String) Specify your walled garden by entering an array of addresses, ranges using CIDR notation, domain names, and domain wildcards (e.g. `192.168.1.1/24`, `192.168.37.10/32`, `www.yahoo.com`, `*.google.com`]). Meraki`s splash page is automatically included in your walled garden. - `wpa_encryption_mode` (String) The types of WPA encryption. (`WPA1 only`, `WPA1 and WPA2`, `WPA2 only`, `WPA3 Transition Mode`, `WPA3 only` or `WPA3 192-bit Security`) - - Choices: `WPA1 and WPA2`, `WPA1 only`, `WPA2 only`, `WPA3 192-bit Security`, `WPA3 Transition Mode`, `WPA3 only` + - Choices: `WPA1 and WPA2`, `WPA1 only`, `WPA2 only`, `WPA3 192-bit Security`, `WPA3 Transition Mode`, `WPA3 only` ### Read-Only - `id` (String) The id of the object - ### Nested Schema for `active_directory_servers` Required: @@ -159,8 +158,8 @@ Optional: - `port` (Number) (Optional) UDP port the Active Directory server listens on. By default, uses port 3268. - + ### Nested Schema for `ap_tags_and_vlan_ids` Optional: @@ -168,8 +167,8 @@ Optional: - `tags` (List of String) Array of AP tags - `vlan_id` (Number) Numerical identifier that is assigned to the VLAN - + ### Nested Schema for `ldap_servers` Required: @@ -177,8 +176,8 @@ Required: - `host` (String) IP address (or FQDN) of your LDAP server. - `port` (Number) UDP port the LDAP server listens on. - + ### Nested Schema for `named_vlans_tagging_by_ap_tags` Optional: @@ -186,8 +185,8 @@ Optional: - `tags` (List of String) List of AP tags. - `vlan_name` (String) VLAN name that will be used to tag traffic. - + ### Nested Schema for `radius_accounting_servers` Required: @@ -201,8 +200,8 @@ Optional: - `radsec_enabled` (Boolean) Use RADSEC (TLS over TCP) to connect to this RADIUS accounting server. Requires radiusProxyEnabled. - `secret` (String) Shared key used to authenticate messages between the APs and RADIUS server - + ### Nested Schema for `radius_servers` Required: diff --git a/examples/data-sources/meraki_wireless_settings/data-source.tf b/examples/data-sources/meraki_wireless_settings/data-source.tf index 7a18504..066909c 100644 --- a/examples/data-sources/meraki_wireless_settings/data-source.tf +++ b/examples/data-sources/meraki_wireless_settings/data-source.tf @@ -1,4 +1,3 @@ data "meraki_wireless_settings" "example" { - id = "12345678" network_id = "L_123456" } diff --git a/examples/resources/meraki_wireless_settings/import.sh b/examples/resources/meraki_wireless_settings/import.sh index 6228638..50e837e 100644 --- a/examples/resources/meraki_wireless_settings/import.sh +++ b/examples/resources/meraki_wireless_settings/import.sh @@ -1 +1 @@ -terraform import meraki_wireless_settings.example "," +terraform import meraki_wireless_settings.example "" diff --git a/gen/definitions/wireless_settings.yaml b/gen/definitions/wireless_settings.yaml index 703b077..6a7883a 100644 --- a/gen/definitions/wireless_settings.yaml +++ b/gen/definitions/wireless_settings.yaml @@ -4,9 +4,11 @@ rest_endpoint: /networks/%v/wireless/settings put_create: true no_delete: true doc_category: Wireless +test_variables: [test_org, test_network] attributes: - tf_name: network_id type: String + id: true reference: true description: Network ID example: L_123456 @@ -14,8 +16,8 @@ attributes: - model_name: ipv6BridgeEnabled type: Bool description: 'Toggle for enabling or disabling IPv6 bridging in a network (Note: if enabled, SSIDs must also be configured to use bridge mode)' - minimum_test_value: "true" example: "true" + minimum_test_value: "true" - model_name: ledLightsOn type: Bool description: Toggle for enabling or disabling LED lights on all APs in the network (making them run dark) @@ -45,10 +47,10 @@ attributes: example: "false" test_prerequisites: | data "meraki_organization" "test" { - name = "Dev" + name = var.test_org } resource "meraki_network" "test" { organization_id = data.meraki_organization.test.id - name = "Network1" + name = var.test_network product_types = ["switch", "wireless"] } diff --git a/gen/definitions/wireless_ssid.yaml b/gen/definitions/wireless_ssid.yaml index 0560c8e..1908b0f 100644 --- a/gen/definitions/wireless_ssid.yaml +++ b/gen/definitions/wireless_ssid.yaml @@ -27,23 +27,7 @@ attributes: type: String description: The association control method for the SSID (`open`, `open-enhanced`, `psk`, `open-with-radius`, `open-with-nac`, `8021x-meraki`, `8021x-nac`, `8021x-radius`, `8021x-google`, `8021x-entra`, `8021x-localradius`, `ipsk-with-radius`, `ipsk-without-radius` or `ipsk-with-nac`) example: psk - enum_values: - [ - 8021x-entra, - 8021x-google, - 8021x-localradius, - 8021x-meraki, - 8021x-nac, - 8021x-radius, - ipsk-with-nac, - ipsk-with-radius, - ipsk-without-radius, - open, - open-enhanced, - open-with-nac, - open-with-radius, - psk, - ] + enum_values: [8021x-entra, 8021x-google, 8021x-localradius, 8021x-meraki, 8021x-nac, 8021x-radius, ipsk-with-nac, ipsk-with-radius, ipsk-without-radius, open, open-enhanced, open-with-nac, open-with-radius, psk] - model_name: availableOnAllAps type: Bool description: Boolean indicating whether all APs should broadcast the SSID or if it should be restricted to APs matching any availability tags. Can only be false if the SSID has availability tags. @@ -215,24 +199,7 @@ attributes: type: String description: The type of splash page for the SSID (`None`, `Click-through splash page`, `Billing`, `Password-protected with Meraki RADIUS`, `Password-protected with custom RADIUS`, `Password-protected with Active Directory`, `Password-protected with LDAP`, `SMS authentication`, `Systems Manager Sentry`, `Facebook Wi-Fi`, `Google OAuth`, `Microsoft Entra ID`, `Sponsored guest`, `Cisco ISE` or `Google Apps domain`). This attribute is not supported for template children. example: Click-through splash page - enum_values: - [ - Billing, - Cisco ISE, - Click-through splash page, - Facebook Wi-Fi, - Google Apps domain, - Google OAuth, - Microsoft Entra ID, - None, - Password-protected with Active Directory, - Password-protected with LDAP, - Password-protected with Meraki RADIUS, - Password-protected with custom RADIUS, - SMS authentication, - Sponsored guest, - Systems Manager Sentry, - ] + enum_values: [Billing, Cisco ISE, Click-through splash page, Facebook Wi-Fi, Google Apps domain, Google OAuth, Microsoft Entra ID, None, Password-protected with Active Directory, Password-protected with LDAP, Password-protected with Meraki RADIUS, Password-protected with custom RADIUS, SMS authentication, Sponsored guest, Systems Manager Sentry] - model_name: useVlanTagging type: Bool description: Whether or not traffic should be directed to use specific VLANs. This param is only valid if the ipAssignmentMode is `Bridge mode` or `Layer 3 roaming` @@ -254,15 +221,7 @@ attributes: type: String description: The types of WPA encryption. (`WPA1 only`, `WPA1 and WPA2`, `WPA2 only`, `WPA3 Transition Mode`, `WPA3 only` or `WPA3 192-bit Security`) example: WPA2 only - enum_values: - [ - WPA1 and WPA2, - WPA1 only, - WPA2 only, - WPA3 192-bit Security, - WPA3 Transition Mode, - WPA3 only, - ] + enum_values: [WPA1 and WPA2, WPA1 only, WPA2 only, WPA3 192-bit Security, WPA3 Transition Mode, WPA3 only] - model_name: logonName type: String data_path: [activeDirectory, credentials] @@ -346,7 +305,7 @@ attributes: type: String data_path: [ldap, credentials] exclude_test: true - description: "The distinguished name of the LDAP user account (example: cn=user,dc=meraki,dc=com)." + description: 'The distinguished name of the LDAP user account (example: cn=user,dc=meraki,dc=com).' example: cn=user,dc=example,dc=com - model_name: password type: String diff --git a/internal/provider/data_source_meraki_wireless_settings.go b/internal/provider/data_source_meraki_wireless_settings.go index 6e04364..2473d04 100644 --- a/internal/provider/data_source_meraki_wireless_settings.go +++ b/internal/provider/data_source_meraki_wireless_settings.go @@ -133,6 +133,7 @@ func (d *WirelessSettingsDataSource) Read(ctx context.Context, req datasource.Re } config.fromBody(ctx, res) + config.Id = config.NetworkId tflog.Debug(ctx, fmt.Sprintf("%s: Read finished successfully", config.Id.ValueString())) diff --git a/internal/provider/data_source_meraki_wireless_settings_test.go b/internal/provider/data_source_meraki_wireless_settings_test.go index 958070f..4884582 100644 --- a/internal/provider/data_source_meraki_wireless_settings_test.go +++ b/internal/provider/data_source_meraki_wireless_settings_test.go @@ -19,6 +19,7 @@ package provider // Section below is generated&owned by "gen/generator.go". //template:begin imports import ( + "os" "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" @@ -29,6 +30,9 @@ import ( // Section below is generated&owned by "gen/generator.go". //template:begin testAccDataSource func TestAccDataSourceMerakiWirelessSettings(t *testing.T) { + if os.Getenv("TF_VAR_test_org") == "" || os.Getenv("TF_VAR_test_network") == "" { + t.Skip("skipping test, set environment variable TF_VAR_test_org and TF_VAR_test_network") + } var checks []resource.TestCheckFunc checks = append(checks, resource.TestCheckResourceAttr("data.meraki_wireless_settings.test", "ipv6_bridge_enabled", "true")) checks = append(checks, resource.TestCheckResourceAttr("data.meraki_wireless_settings.test", "led_lights_on", "true")) @@ -54,12 +58,14 @@ func TestAccDataSourceMerakiWirelessSettings(t *testing.T) { // Section below is generated&owned by "gen/generator.go". //template:begin testPrerequisites const testAccDataSourceMerakiWirelessSettingsPrerequisitesConfig = ` +variable "test_org" {} +variable "test_network" {} data "meraki_organization" "test" { - name = "Dev" + name = var.test_org } resource "meraki_network" "test" { organization_id = data.meraki_organization.test.id - name = "Network1" + name = var.test_network product_types = ["switch", "wireless"] } @@ -84,6 +90,7 @@ func testAccDataSourceMerakiWirelessSettingsConfig() string { config += ` data "meraki_wireless_settings" "test" { network_id = meraki_network.test.id + depends_on = [meraki_wireless_settings.test] } ` return config diff --git a/internal/provider/data_source_meraki_wireless_ssid_bonjour_forwarding_test.go b/internal/provider/data_source_meraki_wireless_ssid_bonjour_forwarding_test.go index ee51d4f..dafb81a 100644 --- a/internal/provider/data_source_meraki_wireless_ssid_bonjour_forwarding_test.go +++ b/internal/provider/data_source_meraki_wireless_ssid_bonjour_forwarding_test.go @@ -71,6 +71,7 @@ resource "meraki_wireless_ssid" "test" { network_id = meraki_network.test.id ip_assignment_mode = "Bridge mode" } + ` // End of section. //template:end testPrerequisites diff --git a/internal/provider/resource_meraki_wireless_settings.go b/internal/provider/resource_meraki_wireless_settings.go index e696363..f317f62 100644 --- a/internal/provider/resource_meraki_wireless_settings.go +++ b/internal/provider/resource_meraki_wireless_settings.go @@ -31,7 +31,6 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" "github.com/hashicorp/terraform-plugin-framework/schema/validator" - "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/netascode/go-meraki" ) @@ -143,7 +142,7 @@ func (r *WirelessSettingsResource) Create(ctx context.Context, req resource.Crea resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Failed to configure object (POST/PUT), got error: %s, %s", err, res.String())) return } - plan.Id = types.StringValue(res.Get("id").String()) + plan.Id = plan.NetworkId tflog.Debug(ctx, fmt.Sprintf("%s: Create finished successfully", plan.Id.ValueString())) diff --git a/internal/provider/resource_meraki_wireless_settings_test.go b/internal/provider/resource_meraki_wireless_settings_test.go index 86eb5dd..ff49815 100644 --- a/internal/provider/resource_meraki_wireless_settings_test.go +++ b/internal/provider/resource_meraki_wireless_settings_test.go @@ -30,6 +30,9 @@ import ( // Section below is generated&owned by "gen/generator.go". //template:begin testAcc func TestAccMerakiWirelessSettings(t *testing.T) { + if os.Getenv("TF_VAR_test_org") == "" || os.Getenv("TF_VAR_test_network") == "" { + t.Skip("skipping test, set environment variable TF_VAR_test_org and TF_VAR_test_network") + } var checks []resource.TestCheckFunc checks = append(checks, resource.TestCheckResourceAttr("meraki_wireless_settings.test", "ipv6_bridge_enabled", "true")) checks = append(checks, resource.TestCheckResourceAttr("meraki_wireless_settings.test", "led_lights_on", "true")) @@ -62,12 +65,14 @@ func TestAccMerakiWirelessSettings(t *testing.T) { // Section below is generated&owned by "gen/generator.go". //template:begin testPrerequisites const testAccMerakiWirelessSettingsPrerequisitesConfig = ` +variable "test_org" {} +variable "test_network" {} data "meraki_organization" "test" { - name = "Dev" + name = var.test_org } resource "meraki_network" "test" { organization_id = data.meraki_organization.test.id - name = "Network1" + name = var.test_network product_types = ["switch", "wireless"] } diff --git a/internal/provider/resource_meraki_wireless_ssid_bonjour_forwarding_test.go b/internal/provider/resource_meraki_wireless_ssid_bonjour_forwarding_test.go index 7e3f2af..a0c2f61 100644 --- a/internal/provider/resource_meraki_wireless_ssid_bonjour_forwarding_test.go +++ b/internal/provider/resource_meraki_wireless_ssid_bonjour_forwarding_test.go @@ -78,6 +78,7 @@ resource "meraki_wireless_ssid" "test" { network_id = meraki_network.test.id ip_assignment_mode = "Bridge mode" } + ` // End of section. //template:end testPrerequisites