gpt4 book ai didi

kubernetes - Terraform eks 模块 - worker 自定义标签

转载 作者:行者123 更新时间:2023-12-02 12:34:10 24 4
gpt4 key购买 nike

我想要 2 个工作组,每个组都有自定义标签。例如,如果我使用此模板 - https://github.com/terraform-aws-modules/terraform-aws-eks/blob/v4.0.2/examples/basic/main.tf

 worker_groups = [
{
name = "worker-group-1"
....
//here - what I want to have
tags = {selector=wg1}
},
{
name = "worker-group-2"
....
//here - what I want to have
tags = {selector=wg2}
},

我在 https://github.com/terraform-aws-modules/terraform-aws-eks/blob/v4.0.2/variables.tf 中看到了输入变量, 第 115-122 行和模板 - https://github.com/terraform-aws-modules/terraform-aws-eks/blob/v4.0.2/workers.tf , 第 19-29 行,但我不明白如何正确配置它们以获取工作人员的自定义标签。

最佳答案

当前版本略有变化:

worker_groups = [
{
name = "worker-group-1"
....

tags = [
{
key = "k1"
value = "v1"
propagate_at_launch = true
},
{
key = "k2"
value = "v2"
propagate_at_launch = true
}
]
}]

关于kubernetes - Terraform eks 模块 - worker 自定义标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57261675/

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