没有可用的提供程序“ azure”插件与此Terraform版本兼容。 Azurerm -1.28地形-

时间:2019-10-16 22:17:54

标签: terraform terraform-provider-azure

我的环境在OSX上如下所示。

NJ033-10126375:旧示例10126375 $ terraform版本 Terraform v0.12.10 + provider.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 brew升级terraform,然后使用其他无法正常工作的项目。

我几乎无法通过一个地形初始化。

问题已解决是由于使用 azure_public_ip 而不是 azurerm_public_ip 时出现错字。

1 个答案:

答案 0 :(得分:0)

我不相信AzureRM Terraform提供程序在1.29之前支持0.12.x。将您的提供程序版本约束更改为:

version = "~>1.35"

这将为您提供最新版本,也可以从那里升级。这是指向AzureRM提供程序更改日志的链接。

recommended