Skip to content

Commit 68fc3ac

Browse files
Additional checks for new field addition, in order to preserve attribute not returned by API
1 parent caa319d commit 68fc3ac

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

cfn-resources/third-party-integration/cmd/resource/resource.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ func modelToIntegration(currentModel *Model) (out *admin.ThirdPartyIntegration)
342342
func integrationToModel(currentModel Model, integration *admin.ThirdPartyIntegration) Model {
343343
// if "Enabled" is not set in the inputs we dont want to return "Enabled" in outputs
344344
enabled := currentModel.Enabled != nil
345+
sendUserProvidedResourceTags := currentModel.SendUserProvidedResourceTags != nil
345346

346347
/*
347348
The variables from the thirdparty integration are not returned back in reposnse because most of the variables are sensitive variables.
@@ -356,5 +357,9 @@ func integrationToModel(currentModel Model, integration *admin.ThirdPartyIntegra
356357
out.Enabled = nil
357358
}
358359

360+
if !sendUserProvidedResourceTags {
361+
out.SendUserProvidedResourceTags = nil
362+
}
363+
359364
return out
360365
}

cfn-resources/third-party-integration/docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormati
261261

262262
#### SendUserProvidedResourceTags
263263

264-
Flag that indicates whether to send user-provided resource tags.
264+
Flag that indicates whether to include user-defined resource tags when sending metrics and alerts to third-party services.
265265

266266
_Required_: No
267267

cfn-resources/third-party-integration/mongodb-atlas-thirdpartyintegration.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
},
153153
"SendUserProvidedResourceTags": {
154154
"type": "boolean",
155-
"description": "Flag that indicates whether to send user-provided resource tags."
155+
"description": "Flag that indicates whether to include user-defined resource tags when sending metrics and alerts to third-party services."
156156
}
157157
},
158158
"typeName": "MongoDB::Atlas::ThirdPartyIntegration",

0 commit comments

Comments
 (0)