From aaf116150ba4554115f2e5a6fa916736b7f7d587 Mon Sep 17 00:00:00 2001 From: "Kirill Sushkov (teeverr)" Date: Tue, 26 Sep 2023 18:04:33 +0200 Subject: [PATCH] provisioningParamsAreChanged trims space --- pkg/controller/servicecatalog/provisionedproduct/utils.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/controller/servicecatalog/provisionedproduct/utils.go b/pkg/controller/servicecatalog/provisionedproduct/utils.go index e49a835d0d..548402d8f4 100644 --- a/pkg/controller/servicecatalog/provisionedproduct/utils.go +++ b/pkg/controller/servicecatalog/provisionedproduct/utils.go @@ -2,6 +2,7 @@ package provisionedproduct import ( "fmt" + "strings" cfsdkv2types "github.com/aws/aws-sdk-go-v2/service/cloudformation/types" svcsdk "github.com/aws/aws-sdk-go/service/servicecatalog" @@ -23,7 +24,9 @@ func provisioningParamsAreChanged(cfStackParams []cfsdkv2types.Parameter, curren } for _, v := range currentParams { - if cfv, ok := cfStackKeyValue[*v.Key]; ok && pointer.StringEqual(&cfv, v.Value) { + // In this statement/comparison, the provider ignores spaces from the left and right of the parameter value from + // the desired state. Because on cloudformation side spaces are also trimmed + if cfv, ok := cfStackKeyValue[*v.Key]; ok && strings.TrimSpace(pointer.StringDeref(v.Value, "")) == cfv { continue } else { return true