Skip to content

Commit 67c7c00

Browse files
committed
Fix dependecy on alb default target group and fix tf codestyle
1 parent aa8996f commit 67c7c00

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

main.tf

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ module "ecs_instance_label" {
120120
name = var.name
121121
namespace = var.namespace
122122
stage = var.stage
123-
tags = merge({
123+
tags = merge({
124124
"Cluster" = module.ecs.this_ecs_cluster_name
125125
}, var.tags)
126126
}
@@ -256,7 +256,7 @@ module "autoscaling_group" {
256256
#############################################################
257257

258258
module "alb" {
259-
source = "git::https://github.com/cloudposse/terraform-aws-alb.git?ref=tags/0.8.0"
259+
source = "git::https://github.com/cloudposse/terraform-aws-alb.git?ref=tags/0.9.0"
260260
attributes = var.attributes
261261
delimiter = var.delimiter
262262
name = var.name
@@ -333,6 +333,8 @@ resource "aws_security_group_rule" "http_ingress" {
333333
}
334334

335335
data "aws_alb_target_group" "default" {
336+
depends_on = [module.alb]
337+
336338
arn = module.alb.default_target_group_arn
337339
}
338340

@@ -378,7 +380,7 @@ module "traefik" {
378380
ecs_cluster_arn = module.ecs.this_ecs_cluster_arn
379381
ecs_cluster_region = data.aws_region.current.name
380382
alb_security_group_id = module.alb.security_group_id
381-
alb_target_group_arn = module.alb.default_target_group_arn
383+
alb_target_group_arn = data.aws_alb_target_group.default.arn
382384
vpc_id = module.vpc.vpc_id
383385
subnet_ids = module.dynamic_subnets.public_subnet_ids
384386

0 commit comments

Comments
 (0)