Skip to content

Commit

Permalink
adding site_wlan validations
Browse files Browse the repository at this point in the history
  • Loading branch information
tmunzer committed Jul 28, 2024
1 parent cb627d3 commit 747f207
Show file tree
Hide file tree
Showing 4 changed files with 182 additions and 48 deletions.
7 changes: 5 additions & 2 deletions docs/resources/site_wlan.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,17 @@ Optional:
<a id="nestedatt--airwatch"></a>
### Nested Schema for `airwatch`

Optional:
Required:

- `api_key` (String) API Key
- `console_url` (String) console URL
- `enabled` (Boolean)
- `password` (String, Sensitive) password
- `username` (String) username

Optional:

- `enabled` (Boolean)


<a id="nestedatt--app_limit"></a>
### Nested Schema for `app_limit`
Expand Down
2 changes: 1 addition & 1 deletion internal/resource_site_wlan/sdk_to_terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func SdkToTerraform(ctx context.Context, data *models.Wlan) (SiteWlanModel, diag
var no_static_ip types.Bool
var org_id types.String
var portal PortalValue = NewPortalValueNull()
var portal_allowed_hostnames types.List = types.ListNull(types.StringType)
var portal_allowed_hostnames types.List = mist_transform.ListOfStringSdkToTerraformEmpty(ctx)
var portal_allowed_subnets types.List = mist_transform.ListOfStringSdkToTerraformEmpty(ctx)
var portal_api_secret types.String
var portal_denied_hostnames types.List = mist_transform.ListOfStringSdkToTerraformEmpty(ctx)
Expand Down
3 changes: 1 addition & 2 deletions internal/resource_site_wlan/sdk_to_terraform_bonjour.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,10 @@ func bonjourSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *mode

if d != nil && d.AdditionalVlanIds != nil {
var items []attr.Value
var items_type attr.Type = basetypes.StringType{}
for _, item := range d.AdditionalVlanIds {
items = append(items, types.StringValue(item.String()))
}
list, _ := types.ListValue(items_type, items)
list, _ := types.ListValue(basetypes.StringType{}, items)
additional_vlan_ids = list
}
if d != nil && d.Enabled != nil {
Expand Down
Loading

0 comments on commit 747f207

Please sign in to comment.