【发布时间】:2019-02-16 20:23:55
【问题描述】:
我打算使用 Terraform 来支持我在 AWS 中的整个监控基础设施。 到目前为止,在我的 terraform 项目中已经创建了 VPC、子网、适当的安全组。我尽可能使用 Terraform 注册表:
我看到的问题是,在部署 EKS 集群后,它会向 VPC 和子网引入 Terraform 似乎不知道的标签。因此,下次运行 terraform plan 时,它会识别它无法管理的标签并打算删除它们:
------------------------------------------------------------------------
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
~ module.vpc.aws_subnet.private[0]
tags.%: "4" => "3"
tags.kubernetes.io/cluster/monitoring: "shared" => ""
~ module.vpc.aws_subnet.private[1]
tags.%: "4" => "3"
tags.kubernetes.io/cluster/monitoring: "shared" => ""
~ module.vpc.aws_vpc.this
tags.%: "4" => "3"
tags.kubernetes.io/cluster/monitoring: "shared" => ""
Plan: 0 to add, 3 to change, 0 to destroy.
------------------------------------------------------------------------
terraform-provider-aws 和local workaround using bash 存在一个问题,但有谁知道如何让 Terraform 意识到这些标签或让它们以稳健的方式被后续计划忽略?
【问题讨论】:
标签: terraform amazon-eks