Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0 upgrade, refresh not fixing all needed state changes #1124

Closed
srlightbody opened this issue Jan 22, 2021 · 6 comments · Fixed by #1126
Closed

2.0 upgrade, refresh not fixing all needed state changes #1124

srlightbody opened this issue Jan 22, 2021 · 6 comments · Fixed by #1126
Labels
acknowledged Issue has undergone initial review and is in our work queue. bug

Comments

@srlightbody
Copy link

srlightbody commented Jan 22, 2021

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
@ZachGoldberg
Copy link

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.

@jrhouston
Copy link
Collaborator

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.

@redeux redeux added the acknowledged Issue has undergone initial review and is in our work queue. label Jan 22, 2021
@jrhouston
Copy link
Collaborator

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

@srlightbody
Copy link
Author

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

@AeroNotix
Copy link
Contributor

Thank you for fixing so rapidly!

@ghost
Copy link

ghost commented Feb 21, 2021

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!

@ghost ghost locked as resolved and limited conversation to collaborators Feb 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
acknowledged Issue has undergone initial review and is in our work queue. bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants