【发布时间】:2020-02-13 18:28:56
【问题描述】:
我的环境在 OSX 上如下所示。
NJ033-10126375:旧示例 10126375$ terraform 版本 Terraform v0.12.10 + 提供者.azurerm v1.28.0 + provider.random v2.2.1
编辑:当我运行terraform providers 时,我得到以下信息
.
├── provider.azure
├── provider.azurerm ~>1.35
└── provider.random
我在 terraform 中收到以下错误。
No available provider "azure" plugins are compatible with this
Terraform version.
From time to time, new Terraform major releases can change the requirements for
plugins such that older plugins become incompatible.
Terraform checked all of the plugin versions matching the given constraint:
(any version)
Unfortunately, none of the suitable versions are compatible with this version
of Terraform. If you have recently upgraded Terraform, it may be necessary to
move to a newer major release of this provider. Alternatively, if you are
attempting to upgrade the provider to a new major version you may need to
also upgrade Terraform to support the new version.
Consult the documentation for this provider for more information on
compatibility between provider versions and Terraform versions.
下面是我的 vars.auto.tfvars(更改版本或省略它没有帮助)
variable subscription_id {}
variable tenant_id {}
variable client_id {}
variable client_secret {}
provider "azurerm" {
subscription_id = "${var.subscription_id}"
tenant_id = "${var.tenant_id}"
client_id = "${var.client_id}"
client_secret = "${var.client_secret}"
version = "=1.28.0"
}
更有趣的是,这段代码几天前还在工作,我尝试再次运行它而没有任何变化,但它已经损坏了。然后我使用 brew upgrade terraform ,然后其他正在工作的项目不再工作。
我几乎无法通过 terraform init。
问题已解决这是由于使用 azure_public_ip 而不是 azurerm_public_ip 的拼写错误。
【问题讨论】:
-
我也通过使用 azurerm_ 前缀解决了同样的问题。但为什么它会产生误导性错误
标签: terraform terraform-provider-azure