From 8db751ff08ca337d9088c0e310fce7fcd1fb31f5 Mon Sep 17 00:00:00 2001 From: Andrea Piazza Date: Thu, 31 Oct 2024 12:45:49 -0400 Subject: [PATCH] update the buildIntegrationCloudflareAccountRequestBody and buildIntegrationCloudflareAccountUpdateRequestBody to make sure this data is in the payload --- ...resource_datadog_integration_cloudflare_account.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/datadog/fwprovider/resource_datadog_integration_cloudflare_account.go b/datadog/fwprovider/resource_datadog_integration_cloudflare_account.go index 5cd40b0da2..aa3a579f88 100644 --- a/datadog/fwprovider/resource_datadog_integration_cloudflare_account.go +++ b/datadog/fwprovider/resource_datadog_integration_cloudflare_account.go @@ -211,6 +211,15 @@ func (r *integrationCloudflareAccountResource) buildIntegrationCloudflareAccount } attributes.SetName(state.Name.ValueString()) + if !state.Resources.IsNull() { + var resources []string + for _, resource := range state.Resources.Elements() { + resources = append(resources, resource.(types.String).ValueString()) + } + attributes.SetResources(resources) + } + + req := datadogV2.NewCloudflareAccountCreateRequestWithDefaults() req.Data = *datadogV2.NewCloudflareAccountCreateRequestDataWithDefaults() req.Data.SetAttributes(*attributes) @@ -227,6 +236,8 @@ func (r *integrationCloudflareAccountResource) buildIntegrationCloudflareAccount attributes.SetEmail(state.Email.ValueString()) } + + req := datadogV2.NewCloudflareAccountUpdateRequestWithDefaults() req.Data = *datadogV2.NewCloudflareAccountUpdateRequestDataWithDefaults() req.Data.SetAttributes(*attributes)