Skip to content

Commit 447fc78

Browse files
akinrosslhercot
authored andcommitted
[bugfix] bug fix for update of single nested children
1 parent 35bb5d5 commit 447fc78

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

gen/templates/resource.go.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2942,7 +2942,7 @@ for _, {{ .PkgName }}{{.ParentHierarchy}}state := range {{.ParentHierarchy | dec
29422942
{{ .PkgName }}{{.ParentHierarchy}}state.{{.ResourceClassName}}.ElementsAs(ctx, &{{.PkgName}}{{.ParentHierarchy}}State, false)
29432943
}
29442944
{{- end}}
2945-
if !{{ .ParentHierarchy | decapitalize}}.{{.ResourceClassName}}.IsNull() && !{{ .ParentHierarchy | decapitalize}}.{{.ResourceClassName}}.IsUnknown(){
2945+
if !{{ .ParentHierarchy | decapitalize}}.{{.ResourceClassName}}.IsNull() && !{{ .ParentHierarchy | decapitalize}}.{{.ResourceClassName}}.IsUnknown(){{- if and (or (not .IdentifiedBy) .MaxOneClassAllowed) (not .AllowDelete)}}&& !IsEmptySingleNestedAttribute({{ .ParentHierarchy | decapitalize}}.{{.ResourceClassName}}.Attributes()){{- end}} {
29462946
{{- else}}
29472947
{{- if or (not .IdentifiedBy) .MaxOneClassAllowed}}
29482948
{{.ParentHierarchy | decapitalize}}Plan.{{.ResourceClassName}}.As(ctx, &{{.PkgName}}{{.ParentHierarchy}}Plan, basetypes.ObjectAsOptions{})
@@ -2955,7 +2955,7 @@ if !{{.ParentHierarchy | decapitalize}}State.{{.ResourceClassName}}.IsNull(){
29552955
{{.ParentHierarchy | decapitalize}}State.{{.ResourceClassName}}.ElementsAs(ctx, &{{.PkgName}}{{.ParentHierarchy}}State, false)
29562956
}
29572957
{{- end}}
2958-
if !{{ .ParentHierarchy | decapitalize}}Plan.{{.ResourceClassName}}.IsNull() && !{{ .ParentHierarchy | decapitalize}}Plan.{{.ResourceClassName}}.IsUnknown(){
2958+
if !{{ .ParentHierarchy | decapitalize}}Plan.{{.ResourceClassName}}.IsNull() && !{{ .ParentHierarchy | decapitalize}}Plan.{{.ResourceClassName}}.IsUnknown() {
29592959
{{- end}}
29602960
{{- if and (and .IdentifiedBy (not (and .MaxOneClassAllowed (hasPrefix .RnFormat "rs")))) (not (or (not .IdentifiedBy) .MaxOneClassAllowed))}}
29612961
{{ .PkgName }}Identifiers := []{{.ResourceClassName}}Identifier{}

internal/provider/resource_aci_application_epg.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)