【问题标题】:aws - terraform Gateway load balancer targetaws - terraform 网关负载均衡器目标
【发布时间】:2021-05-19 16:24:02
【问题描述】:

我向目标组声明了我的负载均衡器。

resource "aws_lb" "test" {
  load_balancer_type = "gateway"
  name               = "gwlb-test"

  subnet_mapping {
    subnet_id = aws_subnet.Security-Data-1A-subnet.id
  }
}

resource "aws_lb_target_group" "test" {
  name     = "gwlb-test"
  port     = 6081
  protocol = "GENEVE"
  vpc_id   = aws_vpc.subnet_vpc_secu.id
  target_type = "instance"


  health_check {
    port     = 80
    protocol = "HTTP"
   
  }
}

但我找不到通过目标组添加我的两台服务器的代码。

我只想将我的实例添加到目标组。

非常感谢您的帮助

【问题讨论】:

    标签: amazon-web-services terraform


    【解决方案1】:

    您正在寻找aws_lb_target_group_attachment 资源。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-07-24
      • 2021-10-14
      • 2018-09-03
      • 1970-01-01
      • 2014-12-18
      • 1970-01-01
      • 2021-12-04
      • 2020-05-08
      相关资源
      最近更新 更多