Terraform Helm Chart如何传递值?

发布于 2025-01-11 03:23:05 字数 459 浏览 0 评论 0原文

我现在完全不知道如何传递命令行标志的值。请问有人可以提示我吗?我想启用 TCP6。

舵图的价值是:

server:
  env: []

我的代码是:

resource "helm_release" "victoria_metrics" {
  name        = var.vm_release_name
  ...

  dynamic "set" {
    for_each = {
      "server.env" = "-enableTCP6"
    }
    content {
      name  = set.key
      value = set.value
    }
  }
}

I'm totally lost in my mind to understand how I can pass a value of command-line flags for now. Could someone to prompt me, please? I would like to have TCP6 enabled.

The helm chart has value is:

server:
  env: []

My code is:

resource "helm_release" "victoria_metrics" {
  name        = var.vm_release_name
  ...

  dynamic "set" {
    for_each = {
      "server.env" = "-enableTCP6"
    }
    content {
      name  = set.key
      value = set.value
    }
  }
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

可爱暴击 2025-01-18 03:23:05

目前还不清楚你想用你的代码实现什么,我想明白你想要设置 -enableTCP6 标志,就像我在 DOC 你应该这样做:

resource "helm_release" "victoria_metrics" {
  name        = var.vm_release_name
  ...

  dynamic "set" {
    for_each = {
      "enableTCP6" = "true"
    }
    content {
      name  = each.key
      value = each.value
    }
  }
}

如果您可以分享您正在尝试应用的舵图,我会尽力提供更多帮助

It's not so clear what you want to achive with your code, i think to understand that you want to set the -enableTCP6 flag, like i can see in the DOC you should do:

resource "helm_release" "victoria_metrics" {
  name        = var.vm_release_name
  ...

  dynamic "set" {
    for_each = {
      "enableTCP6" = "true"
    }
    content {
      name  = each.key
      value = each.value
    }
  }
}

If you can share which is the helm chart you are trying to apply I'll try to be more helpful

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文