我对terraform很陌生,当我将其中一个资源提取到一个模块中时,我得到了以下内容:
Error: Inconsistent dependency lock file
│
│ The following dependency selections recorded in the lock file are inconsistent with the current
│ configuration:
│ - provider registry.terraform.io/hashicorp/heroku: required by this configuration but no versi
我正在尝试使用terraform的一种方式,这是在Terraform启动和运行的书的末尾描述的。描述的模式说,您可以通过对每个环境(例如prod、dev、ad开发人员环境等)使用*.tfvars文件来定义您的活动环境。这些*.tfvars文件引用另一个回购中的模块,如下所示:
source = "git::https://github.com/github-user/my-module.git?ref=v0.0.1"
# required variables for `my-module` defined here
foo="bar"
这种模式对我来说很有意义
我使用terraform将Azure PostgresSQL灵活服务器部署为PAAS,运行良好。现在,我希望创建不同的角色,并使用terraform为数据库分配不同的特权。但这就提高了下面提到的误差。请看一看,并建议我适当的地形配置和所需的供应商为解决方案。
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider hashicorp/postgresql: provider registry registry.terraf
我正在按照Target Resources教程进行操作,但在运行terraform init设置步骤时遇到以下故障: │ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/aws: locked provider registry.terraform.io/hashicorp/aws 3.39.0 does not match configured version
│ constraint
我克隆了,以便在地形中使用IaC定义的CI/CD管道。
然而,当我运行terraform 时,在所有子目录的每个"main.tf“中都会收到以下警告。下面的示例将取自子文件夹modules/iam-role/
TFLint in src/infrastructure/modules/iam-role/:
2 issue(s) found:
Warning: terraform "required_version" attribute is required (terraform_required_version)
on line 0:
(source c