Officially released in May 2019, version 0.12 of Terraform has brought many new features to the language, but also changes, and during this summer 2020, the new Terraform version 0.13 has been released, also providing new features and some changes.
We must take these changes into account before we upgrade the code.
In this recipe, we will discuss how to verify that our Terraform configuration is compatible with version 0.12. After that, we will learn how to migrate our Terraform configuration from version 0.11 to version 0.12 and then to version 0.13.
Getting ready
Before migrating your code from version 0.11 to the latest version (currently 0.13), you will need to have code that works with the latest version of Terraform 0.11, which is 0.11.14. You can download this version from https://releases.hashicorp.com/terraform/0.11.14/.
It is important to know that if your Terraform configuration is in version 0.11, it is not possible...