You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
│ Error: Invalid index
│
│ on locals.tf line 41, in locals:
│ 41: neg_name = jsondecode(kubernetes_manifest.example.object.metadata.annotations["cloud.google.com/neg-status"])
│ ├────────────────
│ │ kubernetes_manifest.example.object.metadata.annotations is map of string with 1 element
│
│ The given key does not identify an element in this collection value.
Expected Behavior
The cloud.google.com/neg-status should be present as attribute in the neg_name variables, but seems like it didn't check actuall value.
References
- GH-1234 issue reports the same bug, but it was closed due unactivity.
The text was updated successfully, but these errors were encountered:
This issue happens because the provider works with the object that the Kubernetes cluster returns after creation and doesn't update the object(request a newer version) once the conditions are met. Because of that the initial object(the one that the provider receives right after the create call) ends up in the TF state. This object doesn't have the annotation you are looking for in the wait block. As a result, Terraform fails to find it.
I am working on the solution and hope that it will be accepted and available in the upcoming release.
Terraform Version, Provider Version and Kubernetes Version
Affected Resource(s)
kubernetes_manifest
Steps to Reproduce
terraform apply
Terraform Configuration Files
Debug Output
Expected Behavior
The
cloud.google.com/neg-status
should be present as attribute in theneg_name
variables, but seems like it didn't check actuall value.References
- GH-1234 issue reports the same bug, but it was closed due unactivity.
The text was updated successfully, but these errors were encountered: