terraform-provider-kustomization
terraform-provider-kustomization copied to clipboard
Trying to apply a job which already exist fails with "JSON parse error"
The job was not being imported because it did not have the kubectl.kubernetes.io/last-applied-configuration
annotation (because of the kubectl replace
usage).
It failed with:
github.com/kbst/terraform-provider-kustomize/kustomize.kustomizationResourceUpdate: JSON parse error: unexpected end of JSON input
Would it be possible to have a more simple human readable message?
Thanks for this project!
I'm currently just returning the error from the Go JSON parser. Not optimal, I agree. If somebody wants to take a shot at improving this, I'd happily accept a PR.
The provider returns a more useful message now: https://github.com/kbst/terraform-provider-kustomization/blob/master/kustomize/resource_kustomization.go#L416-L421