我使用“ terraform-aws-modules / vpc / aws(v2.63.0)预置了VPC,使用“ terraform-aws-modules / eks / aws(v13.0.0)”预置了带有ASG的EKS。想要使用terraform-aws-modules / alb / aws(v5.9.0)将网络负载平衡器添加到ASG。
注意:在VPC模块中,启用了nat_gateway。
enable_nat_gateway = true
single_nat_gateway = true
enable_dns_hostnames = true
enable_dns_support = true
我有几个问题。
1 module "nlb" {
2 source = "terraform-aws-modules/alb/aws"
3 version = 5.9.0
4
5 name = "nlb"
6
7 load_balancer_type = "network"
8
9 vpc_id = module.vpc.vpc_id
10 #subnets = module.vpc.private_subnets
11 #subnets = module.vpc.public_subnets
12
13 access_logs = {
14 bucket = "nlb-logs"
15 }
16
17 target_groups = [
18 {
19 name_prefix = "pref-"
20 backend_protocol = "TCP"
21 backend_port = 80
22 target_type = "ip"
23 }
24 ]
......
90 }