Skip to content

Commit

Permalink
provisioningParamsAreChanged trims space
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Sushkov (teeverr) committed Sep 26, 2023
1 parent ce8a8a1 commit aaf1161
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/controller/servicecatalog/provisionedproduct/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit aaf1161

Please sign in to comment.