Skip to content

Commit af43a2b

Browse files
author
Benjamin Valiente (Contractor)
committed
fix: upgrade aws provider for ingress and waf modules
1 parent fac86df commit af43a2b

3 files changed

Lines changed: 27 additions & 25 deletions

File tree

‎aws/ingress/main.tf‎

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
11
module "alb" {
2-
# TODO: update ref when merged into main
3-
providers = { aws.cluster = aws.cluster, aws.route53 = aws.route53 }
4-
source = "github.com/thoughtbot/terraform-alb-ingress?ref=v0.5.2"
2+
providers = { aws.alb = aws.cluster, aws.route53 = aws.route53 }
3+
source = "github.com/thoughtbot/terraform-alb-ingress?ref=v0.8.0"
54

6-
alarm_actions = var.alarm_actions
7-
alarm_evaluation_minutes = var.alarm_evaluation_minutes
8-
alternative_domain_names = var.alternative_domain_names
9-
certificate_domain_name = var.certificate_domain_name
10-
create_aliases = var.create_aliases
11-
description = "Flightdeck cluster load balancer"
12-
failure_threshold = var.failure_threshold
13-
hosted_zone_name = var.hosted_zone_name
14-
issue_certificates = var.issue_certificates
15-
legacy_target_group_names = var.legacy_target_group_names
16-
name = var.name
17-
namespace = var.namespace
18-
primary_domain_name = var.primary_domain_name
19-
slow_response_threshold = var.slow_response_threshold
20-
subnet_ids = module.network.public_subnet_ids
21-
tags = var.tags
22-
target_groups = local.target_groups
23-
target_group_weights = var.target_group_weights
24-
validate_certificates = var.validate_certificates
25-
vpc_id = module.network.vpc.id
5+
alarm_actions = var.alarm_actions
6+
alarm_evaluation_minutes = var.alarm_evaluation_minutes
7+
create_domain_aliases = var.create_aliases ? local.domain_names : []
8+
description = "Flightdeck cluster load balancer"
9+
failure_threshold = var.failure_threshold
10+
hosted_zone_name = var.hosted_zone_name
11+
issue_certificate_domains = var.issue_certificates ? local.domain_names : []
12+
legacy_target_group_names = var.legacy_target_group_names
13+
name = join("-", concat(var.namespace, [var.name]))
14+
primary_certificate_domain = coalesce(var.certificate_domain_name, var.primary_domain_name)
15+
security_group_name = join("-", concat(var.namespace, [var.name]))
16+
slow_response_threshold = var.slow_response_threshold
17+
subnet_ids = module.network.public_subnet_ids
18+
tags = var.tags
19+
target_groups = local.target_groups
20+
target_group_weights = var.target_group_weights
21+
validate_certificates = var.validate_certificates
22+
vpc_id = module.network.vpc.id
2623

2724
depends_on = [module.network]
2825
}
@@ -45,6 +42,11 @@ locals {
4542
values(module.cluster_name).*.shared_tags...
4643
)
4744

45+
# terraform-alb-ingress v0.8.0 replaced the old create_aliases/issue_certificates
46+
# booleans with explicit domain lists; this reconstructs the same "primary +
47+
# alternatives" bundling the old boolean-driven behavior used.
48+
domain_names = concat([var.primary_domain_name], var.alternative_domain_names)
49+
4850
target_groups = zipmap(
4951
var.cluster_names,
5052
[

‎aws/ingress/versions.tf‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
aws = {
55
configuration_aliases = [aws.cluster, aws.route53]
66
source = "hashicorp/aws"
7-
version = "~> 5.0"
7+
version = "~> 6.0"
88
}
99
}
1010
}

‎aws/waf/versions.tf‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ terraform {
33
required_providers {
44
aws = {
55
source = "hashicorp/aws"
6-
version = "~> 5.0"
6+
version = "~> 6.0"
77
}
88
}
99
}

0 commit comments

Comments
 (0)