是否可以将 Terraform 未提供的特定 helm 值导出为输出? 例如,我通过 terraform 使用 Helm 创建了 nginx 入口控制器,我想导出它的外部 IP。 (ip 不是通过 terraform 创建的,这是一个内部 ip)。
谢谢!
嗨,我正在尝试创建一个 azure 公共 ip 并通过 helm release 与 nginx 控制器关联,但是 terraform 不断创建一个额外的公共 ip 并将其分配给负载均衡器外部 ip,我的 helm 发布资源看起来像这样
# https://github.com/kubernetes/ingress-nginx/tree/main/charts/ingress-nginx
resource "helm_release" "nginx_ingress_controller" {
depends_on = [
azurerm_public_ip.k8s_ip
]
name = "nginx-ingress-controller"
repository = "https://kubernetes.github.io/ingress-nginx"
chart = "ingress-nginx"
version = "4.1.3"
namespace = "ns-ingress"
create_namespace = "true"
set {
name = "rbac.create"
value = "true"
}
set {
name = "controller.service.type"
value = "LoadBalancer"
}
set {
name = "controller.service.externalTrafficPolicy"
value = "Local"
}
using the publicip via data resource
set {
name = "controller.service.loadbalancerIP"
value = data.azurerm_public_ip.k8s_ip.ip_address
}
tried referening the public ip resource using curly braces
set {
name = "controller.service.loadBalancerIP"
value = "${azurerm_public_ip.k8s_ip.ip_address}"
}
Providing the annotation
set {
name = "controller.service.annotations.service\\.beta.\\kubernetes.\\io/azure-load-balancer-ipv4"
value = "${data.azurerm_public_ip.k8s_ip.ip_address}"
}
似乎都没有用,我想念的是什么?
在此先感谢所有 Terraform 大师