Closed nazarewk closed 1 year ago
I've tried refactoring to see if there would be any code left after IF-ing everything depending on new value, but there wasn't anything left except loading old manifest, so it's mostly just improved error message and returning early without errors.
can I get a review @pst ?
I've noticed the same error happens during update after I delete last-applied config from a resource
What's the status on this issue? I can see it's being worked, more so trying to get an idea if we need to actually do something or wait for an imminent fix.
I finally found the time to look into this, and I unfortunately have to tell you that I have decided to not merge this.
I don't see any real world situation where this is an issue, your prerender "hack" to work around the for_each
limitation with known after apply values is not a valid use in my opinion. If you depend on values that are known after apply, avoid the for_each
by having one kustomization_resource
per K8s resource. Or fall back to the apply --target
as suggested by Terraform.
If there are valid uses where the provider crashes because of such an issue
github.com/kbst/terraform-provider-kustomize/kustomize.kustomizationResourceDiff: github.com/kbst/terraform-provider-kustomize/kustomize.(*kManifest).load: json error: unexpected end of JSON input
not sure if it's the right way to go, but my workday is now over and i still want to share the findings
fixes #219