Closed KingAndrew closed 1 year ago
@KingAndrew you need to remove the 9: version = "~> 2.0" from the provider version. This will get rid of the deprecated warning
As is listed multiple times in the book and this repo, the code examples are only tested with Terraform 0.12. Versions 0.13, 0.14, and 0.15 all introduced backwards incompatible changes, and the book/examples have not yet been updated to take those into account.
This has been updated in the 3rd edition of the book.
Warning: Version constraints inside provider configuration blocks are deprecated │ │ on main.tf line 9, in provider "aws": │ 9: version = "~> 2.0"
Terraform 0.13 and earlier allowed provider version constraints inside the provider configuration block, but that is │ now deprecated and will be removed in a future version of Terraform. To silence this warning, move the provider │ version constraint into the required_providers block.
At this point in the book, I'm not sure where required_providers block is at.