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

Updating terraform files from version 1.22 to 1.39 with out changing manually in every file #5253

Closed
venkey1000 opened this issue Dec 25, 2019 · 5 comments

Comments

@venkey1000
Copy link
Contributor

venkey1000 commented Dec 25, 2019

Hi, We are largely dependent on Terraform for our infra launch in scale(like thousands of azure resources have been launched), we are looking to upgrade terraform provider version from 1.22 to 1.39(latest right now). Is there any way to upgrade this smoothly.
One way is updating tf files manually by checking the fields which are deprecated but this we can not do as there are so many resources present. Is there any better way for updating?

@venkey1000 venkey1000 changed the title Updating terraform files from version 1.22 to 1.39 with out manual changes in files Updating terraform files from version 1.22 to 1.39 with out changing manually in every file Dec 25, 2019
@vermaabhay
Copy link

I am also stuck at the same issue. Please help..!!

@katbyte
Copy link
Collaborator

katbyte commented Dec 31, 2019

@venkey1000, @vermaabhay,

What you can do is pin to the newest version of the provider (prior to 2.0) and run plan. It should then tell you what properties are deprecated allowing you to make the required changes (as well as see if there are any behaviour changes that may need addressing)

@venkey1000
Copy link
Contributor Author

venkey1000 commented Dec 31, 2019

Hi @katbyte ,
We are able to figure out the deprecated fields by running the plan, there are three types of changes for update,

  1. Deprecated fields
  2. route table association needs different resource to be created in 1.39
  3. values for some fields are becoming case sensitive

As i have few hundreds of tf files, i can not do it manually, i need to do it programatically, In the above points i have mentioned i can do change 1 programatically , but change 2 and 3 are bit difficult to do programatically, i have to do manually. Is there any better automatic way(like any command for updating tf files to particular version) for updating?

@tombuildsstuff
Copy link
Contributor

hi @venkey1000

Is there any better automatic way(like any command for updating tf files to particular version) for updating?

We've put out an upgrade guide for the 2.0 release containing all removals, since this is a major release - however for deprecations we rely on the inline warnings and notes in the changelog.

Unfortunately there's no automated mechanism for doing so at this time - that said this sounds like something that'd be beneficial. So that the Terraform Core team can dig into this use-case further - would you mind opening an issue on the Terraform Core repository so that the Core Team can take a look and better understand the specific use-case you have in mind here? (e.g. if that's a command like terraform provider config-upgrade or similar)

For the moment since this isn't something directly actionable in the Azure Provider at this time, I'm going to close this issue for the moment - however should support for this become available in Terraform Core we'd look to use this for deprecations going forward

Thanks!

@ghost
Copy link

ghost commented May 9, 2020

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 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators May 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants