[英]Terraform MySQL provider 'Error: Failed to install providers'
当我开始我的“terraform init”序列时,我遇到了这个错误。 不知道如何解决。
我尝试过的事情:
地形 0.13upgrade 。
尝试更改 mysql 的固定版本
搜索文档但找不到类似的问题。
运行“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
主文件
provider "mysql" {
alias = "create_users"
endpoint = format("%s:3306", module.mysql_server.primary_fqdn)
username = var.administrator_login
password = var.administrator_password
}
版本.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"
}
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.