diff --git a/go.mod b/go.mod index af6f134..d33eeb9 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 github.com/hashicorp/terraform-plugin-testing v1.5.1 github.com/mitchellh/go-homedir v1.1.0 - github.com/nuonco/nuon-go v0.29.0 + github.com/nuonco/nuon-go v0.29.1 github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.18.2 diff --git a/go.sum b/go.sum index 1f47ca5..d8ff356 100644 --- a/go.sum +++ b/go.sum @@ -243,6 +243,8 @@ github.com/nuonco/nuon-go v0.28.1 h1:mFcFDtoM5BFjRvt50aK2w9/Lgzz5i+fuVLumgMSfeHA github.com/nuonco/nuon-go v0.28.1/go.mod h1:9hQTXgG2MUXaAtW8SN3X6yiWPs4Z4LcIr+CqhECklGI= github.com/nuonco/nuon-go v0.29.0 h1:xX/Co0Cdb7joWwGTNwLW9OMNcdMTvEN3znIuHEctZUE= github.com/nuonco/nuon-go v0.29.0/go.mod h1:9hQTXgG2MUXaAtW8SN3X6yiWPs4Z4LcIr+CqhECklGI= +github.com/nuonco/nuon-go v0.29.1 h1:cIPOvfbGHCsFsKfwMbBOpf3r1RWdVP2HGtfmY1ebh24= +github.com/nuonco/nuon-go v0.29.1/go.mod h1:9hQTXgG2MUXaAtW8SN3X6yiWPs4Z4LcIr+CqhECklGI= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= diff --git a/internal/provider/app_resource.go b/internal/provider/app_resource.go index 85aac87..a14750e 100644 --- a/internal/provider/app_resource.go +++ b/internal/provider/app_resource.go @@ -111,9 +111,6 @@ func (r *AppResource) Create(ctx context.Context, req resource.CreateRequest, re if appResp.Description != "" { data.Description = types.StringValue(appResp.Description) } - if appResp.SlackWebhookURL != "" { - data.SlackWebhookURL = types.StringValue(appResp.SlackWebhookURL) - } // return populated terraform model resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) @@ -179,7 +176,7 @@ func (r *AppResource) Read(ctx context.Context, req resource.ReadRequest, resp * data.Id = types.StringValue(appResp.ID) data.Description = types.StringValue(appResp.Description) data.DisplayName = types.StringValue(appResp.DisplayName) - data.SlackWebhookURL = types.StringValue(appResp.SlackWebhookURL) + data.SlackWebhookURL = types.StringValue(appResp.NotificationsConfig.SlackWebhookURL) // return populated terraform model resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) @@ -226,9 +223,6 @@ func (r *AppResource) Update(ctx context.Context, req resource.UpdateRequest, re if appResp.Description != "" { data.Description = types.StringValue(appResp.Description) } - if appResp.SlackWebhookURL != "" { - data.SlackWebhookURL = types.StringValue(appResp.SlackWebhookURL) - } // return populated terraform model resp.Diagnostics.Append(resp.State.Set(ctx, &data)...)