Skip to content

Commit

Permalink
OCM-12050 | fix: remove rosa_creatorn_arn update validation
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbranco committed Oct 24, 2024
1 parent 817d29a commit 6a84d9e
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions provider/clusterrosa/common/properties.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package common

import (
"context"
"fmt"

"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/terraform-redhat/terraform-provider-rhcs/provider/common"
Expand All @@ -13,16 +12,16 @@ func ValidatePatchProperties(ctx context.Context, state, plan types.Map) (map[st
if err != nil {
return nil, err
}
if creatorArnValue, ok := propertiesElements[PropertyRosaCreatorArn]; ok {
ogProperties, err := common.OptionalMap(ctx, state)
if err != nil {
return nil, err
}
if ogCreatorArn, ogOk := ogProperties[PropertyRosaCreatorArn]; ogOk {
if creatorArnValue != ogCreatorArn {
return nil, fmt.Errorf("Can't patch property '%s'", PropertyRosaCreatorArn)
}
}
}
// if creatorArnValue, ok := propertiesElements[PropertyRosaCreatorArn]; ok {
// ogProperties, err := common.OptionalMap(ctx, state)
// if err != nil {
// return nil, err
// }
// if ogCreatorArn, ogOk := ogProperties[PropertyRosaCreatorArn]; ogOk {
// if creatorArnValue != ogCreatorArn {
// return nil, fmt.Errorf("Can't patch property '%s'", PropertyRosaCreatorArn)
// }
// }
// }
return propertiesElements, nil
}

0 comments on commit 6a84d9e

Please sign in to comment.