Skip to content

Commit bd399e5

Browse files
committed
Fix diffs when resource does not yet exist
1 parent 03f3478 commit bd399e5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

kustomize/resource_kustomization.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ func kustomizationResourceDiff(d *schema.ResourceDiff, m interface{}) error {
190190
return nil
191191
}
192192

193+
srcJSON := originalJSON.(string)
194+
if srcJSON == "" {
195+
return nil
196+
}
197+
193198
desiredJSON := modifiedJSON.(string)
194199
if desiredJSON == "" {
195200
return nil

0 commit comments

Comments
 (0)