Terraform MySQL provider 'Error: Failed to install providers'

Terraform MySQL provider 'Error: Failed to install providers'

我在开始我的 'terraform init' 序列时 运行 遇到了这个错误。 不知道如何解决。

我尝试过的事情:
地形 0.13 升级。
尝试更改 mysql
的固定版本 搜索文档但找不到类似问题。

运行ning 'terraform init'

后的错误输出
- Finding hashicorp/mysql versions matching ">= 1.5.*"...

Error: Failed to install providers

Could not find required providers, but found possible alternatives:

  hashicorp/mysql -> terraform-providers/mysql

If these suggestions look correct, upgrade your configuration with the
following commands:
    terraform 0.13upgrade .
    terraform 0.13upgrade ..\mysql-module-test\mysql_server


main.tf

provider "mysql" {
  alias = "create_users"

  endpoint = format("%s:3306", module.mysql_server.primary_fqdn)
  username = var.administrator_login
  password = var.administrator_password
}

versions.tf

# Configure terraform and azure provider
terraform {
  required_version = ">= 0.13.0"

  required_providers {
    azurerm = ">= 2.25.0"
    random  = ">= 2.2.0"
    mysql   = ">= 1.5"
  }
}

根据提示,尝试运行terraform 0.13upgrade升级配置。版本控制应该是这样的,

# Configure terraform and azure provider
terraform {
  required_version = ">= 0.13.0"

  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = ">= 2.25.0"
    }
    random = {
      source  = "hashicorp/random"
      version = ">= 2.2.0"
    }
    mysql = {
      source  = "terraform-providers/mysql"
      version = ">= 1.5"
    }
  }
}