From 264e85acec85a086b81391efa14d404800460237 Mon Sep 17 00:00:00 2001 From: Thomas Munzer Date: Wed, 4 Sep 2024 09:31:01 +0200 Subject: [PATCH] fix allow_ssdp in site_wlan and org_wlan --- internal/datasource_org_webhooks/sdk_to_terraform.go | 1 + internal/resource_org_wlan/terraform_to_sdk.go | 4 ++-- internal/resource_site_wlan/terraform_to_sdk.go | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/datasource_org_webhooks/sdk_to_terraform.go b/internal/datasource_org_webhooks/sdk_to_terraform.go index 4f068b7..e40142c 100644 --- a/internal/datasource_org_webhooks/sdk_to_terraform.go +++ b/internal/datasource_org_webhooks/sdk_to_terraform.go @@ -23,6 +23,7 @@ func SdkToTerraform(ctx context.Context, l *[]models.Webhook, elements *[]attr.V return diags } + func webhookSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.Webhook) OrgWebhooksValue { var state OrgWebhooksValue diff --git a/internal/resource_org_wlan/terraform_to_sdk.go b/internal/resource_org_wlan/terraform_to_sdk.go index d524bb2..1a42cc0 100644 --- a/internal/resource_org_wlan/terraform_to_sdk.go +++ b/internal/resource_org_wlan/terraform_to_sdk.go @@ -62,10 +62,10 @@ func TerraformToSdk(ctx context.Context, plan *OrgWlanModel) (*models.Wlan, diag data.AllowMdns = plan.AllowMdns.ValueBoolPointer() } - if plan.AllowMdns.IsNull() || plan.AllowMdns.IsUnknown() { + if plan.AllowSsdp.IsNull() || plan.AllowSsdp.IsUnknown() { unset["-allow_ssdp"] = "" } else { - data.AllowMdns = plan.AllowMdns.ValueBoolPointer() + data.AllowSsdp = plan.AllowSsdp.ValueBoolPointer() } if plan.ApIds.IsNull() || plan.ApIds.IsUnknown() { diff --git a/internal/resource_site_wlan/terraform_to_sdk.go b/internal/resource_site_wlan/terraform_to_sdk.go index 11a1f72..74da3cf 100644 --- a/internal/resource_site_wlan/terraform_to_sdk.go +++ b/internal/resource_site_wlan/terraform_to_sdk.go @@ -58,10 +58,10 @@ func TerraformToSdk(ctx context.Context, plan *SiteWlanModel) (*models.Wlan, dia data.AllowMdns = plan.AllowMdns.ValueBoolPointer() } - if plan.AllowMdns.IsNull() || plan.AllowMdns.IsUnknown() { + if plan.AllowSsdp.IsNull() || plan.AllowSsdp.IsUnknown() { unset["-allow_ssdp"] = "" } else { - data.AllowMdns = plan.AllowMdns.ValueBoolPointer() + data.AllowSsdp = plan.AllowSsdp.ValueBoolPointer() } if plan.ApIds.IsNull() || plan.ApIds.IsUnknown() {