Bar*_*t C 5 terraform terraform-provider-gcp
我正在尝试在 required_providers 中以新的方式设置我的提供程序的版本,如下所示
\nterraform {\n required_providers {\n cloudflare = {\n source = "cloudflare/cloudflare"\n version = "~> 2.11.0"\n }\n google = {\n source = "hashicorp/google"\n version = "~> 3.39.0"\n }\n kubernetes = {\n source = "hashicorp/kubernetes"\n version = "~> 1.13.2"\n }\n vault = {\n source = "hashicorp/vault"\n version = "~> 2.14.0"\n }\n }\n required_version = "~> 0.13.2"\n}\nRun Code Online (Sandbox Code Playgroud)\n\n但是,当我运行时,terraform init我仍然得到以下输出。
The following providers do not have any version constraints in configuration,\nso the latest version was installed.\n\nTo prevent automatic upgrades to new major versions that may contain breaking\nchanges, we recommend adding version constraints in a required_providers block\nin your configuration, with the constraint strings suggested below.\n\n* -/google: version = "~> 3.39.0"\n* -/kubernetes: version = "~> 1.13.2"\n* -/vault: version = "~> 2.14.0"\nRun Code Online (Sandbox Code Playgroud)\n难道我做错了什么?
\n这是整个输出terraform init
\xe2\x9d\xaf terraform init \n\nInitializing the backend...\n\nInitializing provider plugins...\n- Finding latest version of -/google...\n- Finding latest version of -/kubernetes...\n- Finding latest version of -/vault...\n- Finding hashicorp/google versions matching "~> 3.39.0"...\n- Finding hashicorp/kubernetes versions matching "~> 1.13.2"...\n- Finding hashicorp/vault versions matching "~> 2.14.0"...\n- Finding cloudflare/cloudflare versions matching "~> 2.11.0"...\n- Installing hashicorp/google v3.39.0...\n- Installed hashicorp/google v3.39.0 (signed by HashiCorp)\n- Installing hashicorp/kubernetes v1.13.2...\n- Installed hashicorp/kubernetes v1.13.2 (signed by HashiCorp)\n- Installing hashicorp/vault v2.14.0...\n- Installed hashicorp/vault v2.14.0 (signed by HashiCorp)\n- Installing cloudflare/cloudflare v2.11.0...\n- Installed cloudflare/cloudflare v2.11.0 (signed by a HashiCorp partner, key ID DE413CEC881C3283)\n- Installing -/google v3.39.0...\n- Installed -/google v3.39.0 (signed by HashiCorp)\n- Installing -/kubernetes v1.13.2...\n- Installed -/kubernetes v1.13.2 (signed by HashiCorp)\n- Installing -/vault v2.14.0...\n- Installed -/vault v2.14.0 (signed by HashiCorp)\n\nPartner and community providers are signed by their developers.\nIf you\\\'d like to know more about provider signing, you can read about it here:\nhttps://www.terraform.io/docs/plugins/signing.html\n\nThe following providers do not have any version constraints in configuration,\nso the latest version was installed.\n\nTo prevent automatic upgrades to new major versions that may contain breaking\nchanges, we recommend adding version constraints in a required_providers block\nin your configuration, with the constraint strings suggested below.\n\n* -/google: version = "~> 3.39.0"\n* -/kubernetes: version = "~> 1.13.2"\n* -/vault: version = "~> 2.14.0"\n\nTerraform has been successfully initialized!\n\nYou may now begin working with Terraform. Try running "terraform plan" to see\nany changes that are required for your infrastructure. All Terraform commands\nshould now work.\n\nIf you ever set or change modules or backend configuration for Terraform,\nrerun this command to reinitialize your working directory. If you forget, other\ncommands will detect it and remind you to do so if necessary.\nRun Code Online (Sandbox Code Playgroud)\n
将@MartinAtkins的评论变成答案:
这些
-/name提供程序是您所在州的非命名空间提供程序引用的临时表示。如果您运行terraform apply,那么它应该创建一个新的状态快照,其中自动升级(基于配置),然后将来的terraform init运行不应再次提及它们。
| 归档时间: |
|
| 查看次数: |
3570 次 |
| 最近记录: |