【问题标题】:Unable to use variable count in terragrunt无法在 terragrunt 中使用变量计数
【发布时间】:2021-05-01 19:18:54
【问题描述】:

首先,我使用 terraform 创建了一个生命周期策略,使用此链接https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dlm_lifecycle_policy。后来我使用 terragrunt 创建生命周期策略,但使用变量 count 时出错。我将变量声明为数字数据类型。 运行 terragrunt plan-all 时出现此错误 ''' 错误:变量名无效

在 variables.tf 第 36 行,在变量“count”中: 36:变量“计数”{

变量名“count”由于其在模块中的特殊含义而被保留 块。 '''

[terragrunt] 2021/01/26 20:51:01 遇到如下错误: 遇到多个错误: 退出状态 1

我该如何解决这个问题。在此先感谢

【问题讨论】:

    标签: terragrunt


    【解决方案1】:

    您无能为力,因为错误显示 terraform 保留了一些变量名供内部使用,

    https://www.terraform.io/docs/language/values/variables.html#declaring-an-input-variable

    您唯一能做的就是为您的变量选择另一个名称。

    【讨论】:

      猜你喜欢
      • 2021-06-01
      • 2021-12-16
      • 2021-05-16
      • 2020-07-23
      • 2020-07-10
      • 2020-07-02
      • 2016-11-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多