Skip to content

Commit 53e94da

Browse files
benjaminvalienteBenjamin Valiente (Contractor)github-actions[bot]
authored
fix: upgrade aws provider for ingress and waf modules (#276)
* fix: upgrade aws provider for ingress and waf modules * terraform-docs: automated action --------- Co-authored-by: Benjamin Valiente (Contractor) <benjamin.valiente@thoughtbot.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent fac86df commit 53e94da

5 files changed

Lines changed: 31 additions & 29 deletions

File tree

‎aws/ingress/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ module "ingress" {
9595
| Name | Version |
9696
|------|---------|
9797
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.14.8 |
98-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.0 |
98+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 6.0 |
9999

100100
## Modules
101101

102102
| Name | Source | Version |
103103
|------|--------|---------|
104-
| <a name="module_alb"></a> [alb](#module\_alb) | github.com/thoughtbot/terraform-alb-ingress | v0.5.2 |
104+
| <a name="module_alb"></a> [alb](#module\_alb) | github.com/thoughtbot/terraform-alb-ingress | v0.8.0 |
105105
| <a name="module_cluster_name"></a> [cluster\_name](#module\_cluster\_name) | ../cluster-name | n/a |
106106
| <a name="module_network"></a> [network](#module\_network) | ../network-data | n/a |
107107
| <a name="module_waf"></a> [waf](#module\_waf) | ../waf | n/a |

‎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/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ Note: For each rule, if you are providing a country list, you can only specify e
5555
| Name | Version |
5656
|------|---------|
5757
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.4.0 |
58-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.0 |
58+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 6.0 |
5959

6060
## Providers
6161

6262
| Name | Version |
6363
|------|---------|
64-
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 5.0 |
64+
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 6.0 |
6565

6666
## Modules
6767

‎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)