Terraform-provider-kubernetes: 2.0 upgrade, refresh not fixing all needed state changes

Created on 22 Jan 2021  ·  6Comments  ·  Source: hashicorp/terraform-provider-kubernetes

Terraform Version, Provider Version and Kubernetes Version

❯ terraform -v
Terraform v0.14.5
+ provider registry.terraform.io/hashicorp/google v3.53.0
+ provider registry.terraform.io/hashicorp/kubernetes v2.0.0
+ provider registry.terraform.io/hashicorp/time v0.6.0

Affected Resource(s)

  • kubernetes_deployment

Steps to Reproduce

  1. Have a kubernetes_deployment defined with no limits set or limits = null
  2. Upgrade to 2.0
  3. Run a terraform refresh or plan

Expected Behavior

What should have happened?
The state was upgraded

Actual Behavior

What actually happened?
The following output -

Error: missing expected {

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
acknowledged bug

Most helpful comment

Thanks for opening this @srlightbody.

Looks like we missed a corner case in the StateUpgrader for this. We will need to account for requests/limits being an empty array in the state file and migrate to an empty map here.

Hotfix PR incoming.

All 6 comments

Looks like terraform cloud just auto-upgraded me from 1.13 to 2.0, followed the guide and am now blocked ;(. Reverting to 1.13 seems to still work.

Thanks for opening this @srlightbody.

Looks like we missed a corner case in the StateUpgrader for this. We will need to account for requests/limits being an empty array in the state file and migrate to an empty map here.

Hotfix PR incoming.

Should be fixed in v2.0.1, please try again and let us know @ZachGoldberg @srlightbody

Looks good! Just tested it on several repos that were having issues and they worked as expected.

Thank you for fixing so rapidly!

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

Was this page helpful?
0 / 5 - 0 ratings