在执行 terraform init 时出现错误,按照 terraform 官方文档的指示,我试图通过 terraform 创建 azure-pipeline,并为此创建了模块,但是无法初始化。如果我直接在 .tf 文件中传递它,则可以正常工作,但是当添加到模块中时,terraform init 命令本身会失败。
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/mysql: provider registry registry.terraform.io does not have a provider named
│ registry.terraform.io/hashicorp/mysql
│
│ Did you intend to use terraform-providers/mysql? If so, you must specify that source address in each module which requires that provider. To see which
│ modules are currently depending on hashicorp/mysql, run the following command:
│ terraform providers
╵
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/azuredevops: provider registry registry.terraform.io does not have a provider named
│ registry.terraform.io/hashicorp/azuredevops
│
│ Did you intend to use microsoft/azuredevops? If so, you must specify that source address in each module which requires that provider. To see which modules
│ are currently depending on hashicorp/azuredevops, run the following command:
│ terraform providers