Closed papanito closed 2 weeks ago
Hello Thank you for opening this PR @papanito
I just attempted your tfconfig on my own and was able to get it to run successfully with no Error. Could you try this with the latest kubernetes provider
version? This may have been fixed in one of our previous releases. Also could you provide the logs as well by running TF_LOG=debug terraform apply
@papanito one more question, are you running a fresh install of the CRDs or have you made changes to the CRD configs? This could cause issues when attempting to run the manifest apply where the schema doesn't match up with the CRD config.
Sorry I will check and come back to you
@papanito I'm facing the same issue and I'm trying to use the existing terraform state. If I do a new setup it doesn't give any warnings or errors but if I do on existing setups this gives a warning. How to proceed on this ?
The remote state for the kubernetes_manifest has a 'metadata' field for 'clusterName' that is set to 'null'. I deleted the remote state, and then re-imported, and now the remote state does not have a 'clusterName' metadata field anymore, and all works fine.
I think at some point the implementation of kubernetes_manifest emitted a clusterName metadata field, and then in some future update they removed it.
Note that, in my case, the CRD doesn't say anything about the metadata field, other than that it is of type 'object'.
Thanks @llamahunter for response. In my case, I update my hashicorp/kubernetes and hashicorp/google version to latest version abd because of that my error shifted to warning and when I did terraform apply it automatically emitted a clusterName from metadata field.
So I guess what you suggested is correct that at some point the implementation of kubernetes_manifest emitted a clusterName metadata field, and then in some future update they removed it.
updating hashicorp/kubernetes & hashicorp/google versions also worked for me
I did not face the issue yet again with newer versions
Terraform Version, Provider Version and Kubernetes Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
N/A
Panic Output
N/A
Steps to Reproduce
Expected Behavior
Plan success.
Actual Behavior
Plan failed:
Important Factoids
Workaround:
References
Community Note