diff --git a/docs/resources/wireless_ssid.md b/docs/resources/wireless_ssid.md index f1f8a37..c0bb6a5 100644 --- a/docs/resources/wireless_ssid.md +++ b/docs/resources/wireless_ssid.md @@ -49,9 +49,11 @@ resource "catalystcenter_wireless_ssid" "example" { ### Required - `auth_type` (String) L2 Authentication Type. If authType is not open, then at least one RSN Cipher Suite and corresponding valid AKM must be enabled. + - Choices: `WPA2_ENTERPRISE`, `WPA2_PERSONAL`, `OPEN`, `WPA3_ENTERPRISE`, `WPA3_PERSONAL`, `WPA2_WPA3_PERSONAL`, `WPA2_WPA3_ENTERPRISE`, `OPEN_SECURED` - `site_id` (String) Site ID - only site level Global is supported - `ssid` (String) Name of the SSID - `wlan_type` (String) Wlan Type + - Choices: `Enterprise`, `Guest` ### Optional @@ -72,6 +74,7 @@ resource "catalystcenter_wireless_ssid" "example" { - `auth_key_suite_b1921x` (Boolean) When set to true, the SuiteB192-1x authentication key feature is enabled - `auth_key_suite_b1x` (Boolean) When activated by setting it to true, the SuiteB-1x authentication key feature is engaged - `auth_server` (String) Authentication Server, Mandatory for Guest SSIDs with wlanType=Guest and l3AuthType=web_auth + - Choices: `auth_ise`, `auth_external`, `auth_internal` - `auth_servers` (Set of String) List of Authentication/Authorization server IpAddresses - `basic_service_set_client_idle_timeout` (Number) This refers to the duration of inactivity, measured in seconds, before a client connected to the Basic Service Set is considered idle and timed out - Range: `15`-`100000` @@ -88,6 +91,7 @@ resource "catalystcenter_wireless_ssid" "example" { - `coverage_hole_detection` (Boolean) Coverage Hole Detection Enable - `directed_multicast_service` (Boolean) The Directed Multicast Service feature becomes operational when it is set to true - `egress_qos` (String) Egress QOS + - Choices: `PLATINUM`, `SILVER`, `GOLD`, `BRONZE` - `enabled` (Boolean) Set SSID's admin status as 'Enabled' when set to true - `external_auth_ip_address` (String) External WebAuth URL (Mandatory for Guest SSIDs with wlanType = Guest, l3AuthType = web_auth and authServer = auth_external) - `fast_lane` (Boolean) True if FastLane is enabled, else False @@ -99,7 +103,9 @@ resource "catalystcenter_wireless_ssid" "example" { - `ghz6_policy_client_steering` (Boolean) True if 6 GHz Policy Client Steering is enabled, else False - `hex` (Boolean) True if passphrase is in Hex format, else False - `ingress_qos` (String) Ingress QOS + - Choices: `PLATINUM-UP`, `SILVER-UP`, `GOLD-UP`, `BRONZE-UP` - `l3_auth_type` (String) L3 Authentication Type + - Choices: `open`, `web_auth` - `mac_filtering` (Boolean) When set to true, MAC Filtering will be activated, allowing control over network access based on the MAC address of the device - `mft_client_protection` (String) Management Frame Protection Client - Choices: `OPTIONAL`, `DISABLED`, `REQUIRED` diff --git a/gen/definitions/wireless_ssid.yaml b/gen/definitions/wireless_ssid.yaml index 210269c..ef37a42 100644 --- a/gen/definitions/wireless_ssid.yaml +++ b/gen/definitions/wireless_ssid.yaml @@ -23,7 +23,7 @@ attributes: - model_name: authType type: String mandatory: true - enun_values: + enum_values: - WPA2_ENTERPRISE - WPA2_PERSONAL - OPEN @@ -265,7 +265,7 @@ attributes: - model_name: egressQos type: String description: Egress QOS - enun_values: + enum_values: - PLATINUM - SILVER - GOLD @@ -274,7 +274,7 @@ attributes: - model_name: ingressQos type: String description: Ingress QOS - enun_values: + enum_values: - PLATINUM-UP - SILVER-UP - GOLD-UP @@ -284,21 +284,21 @@ attributes: type: String mandatory: true description: Wlan Type - enun_values: + enum_values: - Enterprise - Guest example: Enterprise - model_name: l3AuthType type: String description: L3 Authentication Type - enun_values: + enum_values: - open - web_auth exclude_test: true - model_name: authServer type: String description: Authentication Server, Mandatory for Guest SSIDs with wlanType=Guest and l3AuthType=web_auth - enun_values: + enum_values: - auth_ise - auth_external - auth_internal diff --git a/internal/provider/resource_catalystcenter_wireless_ssid.go b/internal/provider/resource_catalystcenter_wireless_ssid.go index 2f46cc9..ce5092c 100644 --- a/internal/provider/resource_catalystcenter_wireless_ssid.go +++ b/internal/provider/resource_catalystcenter_wireless_ssid.go @@ -89,8 +89,11 @@ func (r *WirelessSSIDResource) Schema(ctx context.Context, req resource.SchemaRe }, }, "auth_type": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("L2 Authentication Type. If authType is not open, then at least one RSN Cipher Suite and corresponding valid AKM must be enabled.").String, + MarkdownDescription: helpers.NewAttributeDescription("L2 Authentication Type. If authType is not open, then at least one RSN Cipher Suite and corresponding valid AKM must be enabled.").AddStringEnumDescription("WPA2_ENTERPRISE", "WPA2_PERSONAL", "OPEN", "WPA3_ENTERPRISE", "WPA3_PERSONAL", "WPA2_WPA3_PERSONAL", "WPA2_WPA3_ENTERPRISE", "OPEN_SECURED").String, Required: true, + Validators: []validator.String{ + stringvalidator.OneOf("WPA2_ENTERPRISE", "WPA2_PERSONAL", "OPEN", "WPA3_ENTERPRISE", "WPA3_PERSONAL", "WPA2_WPA3_PERSONAL", "WPA2_WPA3_ENTERPRISE", "OPEN_SECURED"), + }, }, "passphrase": schema.StringAttribute{ MarkdownDescription: helpers.NewAttributeDescription("Passphrase (Only applicable for SSID with PERSONAL security level). Passphrase needs to be between 8 and 63 characters for ASCII type. HEX passphrase needs to be 64 characters").String, @@ -299,24 +302,39 @@ func (r *WirelessSSIDResource) Schema(ctx context.Context, req resource.SchemaRe Optional: true, }, "egress_qos": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Egress QOS").String, + MarkdownDescription: helpers.NewAttributeDescription("Egress QOS").AddStringEnumDescription("PLATINUM", "SILVER", "GOLD", "BRONZE").String, Optional: true, + Validators: []validator.String{ + stringvalidator.OneOf("PLATINUM", "SILVER", "GOLD", "BRONZE"), + }, }, "ingress_qos": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Ingress QOS").String, + MarkdownDescription: helpers.NewAttributeDescription("Ingress QOS").AddStringEnumDescription("PLATINUM-UP", "SILVER-UP", "GOLD-UP", "BRONZE-UP").String, Optional: true, + Validators: []validator.String{ + stringvalidator.OneOf("PLATINUM-UP", "SILVER-UP", "GOLD-UP", "BRONZE-UP"), + }, }, "wlan_type": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Wlan Type").String, + MarkdownDescription: helpers.NewAttributeDescription("Wlan Type").AddStringEnumDescription("Enterprise", "Guest").String, Required: true, + Validators: []validator.String{ + stringvalidator.OneOf("Enterprise", "Guest"), + }, }, "l3_auth_type": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("L3 Authentication Type").String, + MarkdownDescription: helpers.NewAttributeDescription("L3 Authentication Type").AddStringEnumDescription("open", "web_auth").String, Optional: true, + Validators: []validator.String{ + stringvalidator.OneOf("open", "web_auth"), + }, }, "auth_server": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Authentication Server, Mandatory for Guest SSIDs with wlanType=Guest and l3AuthType=web_auth").String, + MarkdownDescription: helpers.NewAttributeDescription("Authentication Server, Mandatory for Guest SSIDs with wlanType=Guest and l3AuthType=web_auth").AddStringEnumDescription("auth_ise", "auth_external", "auth_internal").String, Optional: true, + Validators: []validator.String{ + stringvalidator.OneOf("auth_ise", "auth_external", "auth_internal"), + }, }, "external_auth_ip_address": schema.StringAttribute{ MarkdownDescription: helpers.NewAttributeDescription("External WebAuth URL (Mandatory for Guest SSIDs with wlanType = Guest, l3AuthType = web_auth and authServer = auth_external)").String,