【发布时间】:2020-07-10 17:10:02
【问题描述】:
我正在尝试通过模块的方式使用 terraform azurerm_storage_management_policy 资源,因此我不必在我的代码中重复自己。
我有一种情况需要在某些文件夹上设置以下所有内容:
tier_to_cool_after_days_since_modification_greater_than = var.days_to_cool tier_to_archive_after_days_since_modification_greater_than = var.days_to_archive delete_after_days_since_modification_greater_than = var.days_to_delete
但在某些文件夹上我只需要设置delete_after_days_since_modification_greater_than
我想在我的主配置中不为此环境定义资源的情况下执行此操作,但我没有找到方法来执行此操作。我看到 github 请求 terraform 添加 -1,但被拒绝了。
当我有一个列出所有三个的模块时,有没有一种方法可以不必定义所有三个?
【问题讨论】:
标签: azure terraform azure-storage terraform-provider-azure