Skip to content

Commit

Permalink
Merge pull request #831 from gdbranco/fix/ocm-12050
Browse files Browse the repository at this point in the history
OCM-12050 | fix: warn instead of error rosa_creatorn_arn update validation
  • Loading branch information
gdbranco authored Oct 24, 2024
2 parents ee00601 + c704611 commit 3865ff9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions provider/clusterrosa/classic/cluster_rosa_classic_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -1094,11 +1094,10 @@ func (r *ClusterRosaClassicResource) Update(ctx context.Context, request resourc
if patchProperties {
propertiesElements, err := rosa.ValidatePatchProperties(ctx, state.Properties, plan.Properties)
if err != nil {
response.Diagnostics.AddError(
"Can't patch cluster",
fmt.Sprintf("Can't patch cluster with identifier: '%s', %v", state.ID.ValueString(), err),
response.Diagnostics.AddWarning(
"Shouldn't patch cluster properties",
fmt.Sprintf("Shouldn't patch cluster with identifier: '%s', %v", state.ID.ValueString(), err),
)
return
}
if propertiesElements != nil {
for k, v := range rosa.OCMProperties {
Expand Down
2 changes: 1 addition & 1 deletion provider/clusterrosa/common/properties.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func ValidatePatchProperties(ctx context.Context, state, plan types.Map) (map[st
}
if ogCreatorArn, ogOk := ogProperties[PropertyRosaCreatorArn]; ogOk {
if creatorArnValue != ogCreatorArn {
return nil, fmt.Errorf("Can't patch property '%s'", PropertyRosaCreatorArn)
return nil, fmt.Errorf("Shouldn't patch property '%s'", PropertyRosaCreatorArn)
}
}
}
Expand Down

0 comments on commit 3865ff9

Please sign in to comment.