数据源在计划时不会刷新内容
data "vault_generic_secret" "nr" {
path = "secret/secrets"
}
我有此代码可以从Vault获取数据。我在同一保险库位置添加了一个新秘密(newRelic_license_key),并且在运行Terraform计划时,我会收到以下错误:
"newrelic_license_key" does not exist in map data.vault_generic_secret.nr.data in:
${data.vault_generic_secret.nr.data["newrelic_license_key"]}
根据数据源文档 https://wwwww.terraform.io/language.io/language/language/data-sources#数据资源 - 行为
至少一个给定的参数是Terraform在应用步骤
之前无法预测的托管资源属性或其他值
由于此应用程序的应用步骤,我认为数据源在应用时应该刷新秘密,并且不应在计划中出现错误。
TF版本:V0.11.15 保险库提供商版本:“< 3.0.0”
data "vault_generic_secret" "nr" {
path = "secret/secrets"
}
I have this code to fetch data from Vault. I have added a new secret(newrelic_license_key) in the same vault location and while running terraform plan I am getting the following error:
"newrelic_license_key" does not exist in map data.vault_generic_secret.nr.data in:
${data.vault_generic_secret.nr.data["newrelic_license_key"]}
According to the data source documentation
https://www.terraform.io/language/data-sources#data-resource-behavior
At least one of the given arguments is a managed resource attribute or other value that Terraform cannot predict until the apply step
Due to this I think data source should refresh secrets while applying and should not error out in the plan.
TF version: v0.11.15
Vault Provider Version: "< 3.0.0"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Terraform版本升级解决了问题。
Terraform Version Upgrade resolved the issue.