Skip to content

Commit

Permalink
update the buildIntegrationCloudflareAccountRequestBody and buildInte…
Browse files Browse the repository at this point in the history
…grationCloudflareAccountUpdateRequestBody to make sure this data is in the payload
  • Loading branch information
apiazza-dd committed Oct 31, 2024
1 parent 3788560 commit 8db751f
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -227,6 +236,8 @@ func (r *integrationCloudflareAccountResource) buildIntegrationCloudflareAccount
attributes.SetEmail(state.Email.ValueString())
}



req := datadogV2.NewCloudflareAccountUpdateRequestWithDefaults()
req.Data = *datadogV2.NewCloudflareAccountUpdateRequestDataWithDefaults()
req.Data.SetAttributes(*attributes)
Expand Down

0 comments on commit 8db751f

Please sign in to comment.