This website requires JavaScript.
Explore
Help
Sign In
ResiLien
/
terraform
Watch
2
Star
0
Fork
You've already forked terraform
0
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
f1a292652d
terraform
/
command
/
testdata
/
013upgrade-submodule
/
expected-module
/
module
/
versions.tf
9 lines
121 B
Terraform
Raw
Normal View
History
Unescape
Escape
command: Rework 0.13upgrade sub-command This commit implements most of the intended functionality of the upgrade command for rewriting configurations. For a given module, it makes a list of all providers in use. Then it attempts to detect the source address for providers without an explicit source. Once this step is complete, the tool rewrites the relevant configuration files. This results in a single "required_providers" block for the module, with a source for each provider. Any providers for which the source cannot be detected (for example, unofficial providers) will need a source to be defined by the user. The tool writes an explanatory comment to the configuration to help with this.
2020-05-06 19:35:35 +02:00
terraform
{
required_providers
{
foo
=
{
source
=
"
hashicorp/foo
"
}
}
command: Change 0.13upgrade default to versions.tf Instead of using providers.tf as the default output file for the upgrader, we now default to versions.tf. This means that if the configuration has no `required_providers` blocks at all, or has multiple, the provider version requirements will be stored in the versions.tf file. We now also update the versions.tf file to set a `required_version` attribute in the first `terraform` block, with value ">= 0.13". This is similar to the behaviour of the 0.12upgrade command, and signals that the configuration should not be used with older versions of Terraform.
2020-05-07 21:40:45 +02:00
required_version
=
"
>= 0.13
"
command: Rework 0.13upgrade sub-command This commit implements most of the intended functionality of the upgrade command for rewriting configurations. For a given module, it makes a list of all providers in use. Then it attempts to detect the source address for providers without an explicit source. Once this step is complete, the tool rewrites the relevant configuration files. This results in a single "required_providers" block for the module, with a source for each provider. Any providers for which the source cannot be detected (for example, unofficial providers) will need a source to be defined by the user. The tool writes an explanatory comment to the configuration to help with this.
2020-05-06 19:35:35 +02:00
}