Skip to content

Commit

Permalink
fix: treat TF ExactlyOneOf fields like ConflictsWith and avoid late i…
Browse files Browse the repository at this point in the history
…nitialization of those fields

Signed-off-by: Marques Johansson <[email protected]>
  • Loading branch information
displague committed Jul 29, 2024
1 parent 7f585ae commit c11c09b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/overrides.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func SkipOptCompLateInitialization() upconfig.ResourceOption {
return func(r *upconfig.Resource) {
for k, s := range r.TerraformResource.Schema {
if s.Computed && s.Optional {
for _, conflict := range s.ConflictsWith {
for _, conflict := range append(s.ConflictsWith, s.ExactlyOneOf...) {
if cs := r.TerraformResource.Schema[conflict]; cs.Computed && cs.Optional {
r.LateInitializer.AddIgnoredCanonicalFields(conflict)
r.LateInitializer.AddIgnoredCanonicalFields(k)
Expand Down

0 comments on commit c11c09b

Please sign in to comment.