Skip to content

Commit b6cfdf4

Browse files
committed
Cleaning code
1 parent f001b1f commit b6cfdf4

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

examples/test/main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ module "base-network" {
1515
}
1616

1717
module "load_balancer" {
18-
source = "cn-terraform/ecs-alb/aws"
19-
version = "1.0.6"
18+
source = "../../../terraform-aws-ecs-alb"
19+
20+
# source = "cn-terraform/ecs-alb/aws"
21+
# version = "1.0.6"
2022
name_prefix = "test-alb"
2123
vpc_id = module.base-network.vpc_id
2224
private_subnets = module.base-network.private_subnets_ids

main.tf

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
#------------------------------------------------------------------------------
22
# AWS LOAD BALANCER
33
#------------------------------------------------------------------------------
4-
5-
data "aws_lb" "lb" {
6-
arn = var.lb_arn
7-
}
8-
94
data "aws_lb_target_group" "lb_http_target_groups" {
10-
for_each = var.lb_http_tgs_arns != null ? toset(var.lb_http_tgs_arns) : toset([])
5+
for_each = toset(var.lb_http_tgs_arns)
116
arn = each.key
127
}
138

@@ -16,16 +11,6 @@ data "aws_lb_target_group" "lb_https_target_groups" {
1611
arn = each.key
1712
}
1813

19-
data "aws_lb_listener" "lb_http_listeners" {
20-
for_each = var.lb_http_listeners_arns != null ? toset(var.lb_http_listeners_arns) : toset([])
21-
arn = each.key
22-
}
23-
24-
data "aws_lb_listener" "lb_https_listeners" {
25-
for_each = var.lb_https_listeners_arns != null ? toset(var.lb_https_listeners_arns) : toset([])
26-
arn = each.key
27-
}
28-
2914
#------------------------------------------------------------------------------
3015
# AWS ECS SERVICE
3116
#------------------------------------------------------------------------------

0 commit comments

Comments
 (0)