Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCM-12050 | fix: warn instead of error rosa_creatorn_arn update validation #831

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading