gpt4 book ai didi

terraform - 为什么我在 Terraform 中收到 random_id b64 属性的错误?

转载 作者:行者123 更新时间:2023-12-03 15:54:04 33 4
gpt4 key购买 nike

我没有对我的 terraform 脚本进行任何更改,并且部署开始失败并出现如下错误:

2020/10/09 05:00:42 [DEBUG] Using modified User-Agent: Terraform/0.12.26 TFE/v202007-2
Error: Unsupported attribute
on .terraform/modules/rds.rds/main.tf line 3, in locals:
3: master_password = var.password == "" ? random_id.master_password.b64 : var.password
This object has no argument, nested block, or exported attribute named "b64".

最佳答案

根据 v3.0.0 版的变更日志:
https://github.com/hashicorp/terraform-provider-random/blob/master/CHANGELOG.md#300-october-09-2020

Remove deprecated b64 attribute


Terraform 有帮助地建议:
The following providers do not have any version constraints in configuration,
so the latest version was installed.
To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.
* provider.null: version = "~> 3.0"
* provider.random: version = "~> 3.0"
* provider.template: version = "~> 2.2"
* provider.tfe: version = "~> 0.22"
该错误的直接解决方案是通过添加 required_providers 回滚随机提供程序。到 terraform块,可能在 main.tf
terraform {
required_providers {
random = {
version = "~> 2.3.0"
}
}
}

关于terraform - 为什么我在 Terraform 中收到 random_id b64 属性的错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64274321/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com