Skip to content

Commit f431c0f

Browse files
feat!: Bump min supported version of Terraform and AWS to 1.5.7 and 6.5 respectively (#411)
Co-authored-by: Anton Babenko <[email protected]>
1 parent 1377e3c commit f431c0f

File tree

26 files changed

+1097
-672
lines changed

26 files changed

+1097
-672
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.99.4
3+
rev: v1.100.0
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_wrapper_module_for_each
@@ -24,7 +24,7 @@ repos:
2424
- '--args=--only=terraform_workspace_remote'
2525
- id: terraform_validate
2626
- repo: https://github.com/pre-commit/pre-commit-hooks
27-
rev: v5.0.0
27+
rev: v6.0.0
2828
hooks:
2929
- id: check-merge-conflict
3030
- id: end-of-file-fixer

README.md

Lines changed: 48 additions & 42 deletions
Large diffs are not rendered by default.

docs/UPGRADE-10.0.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Upgrade from v9.x to v10.x
2+
3+
Please consult the `examples` directory for reference example configurations. If you find a bug, please open an issue with supporting configuration to reproduce.
4+
5+
## List of backwards incompatible changes
6+
7+
- Terraform `v1.5.7` is now minimum supported version
8+
- AWS provider `v6.5` is now minimum supported version
9+
10+
## Additional changes
11+
12+
### Added
13+
14+
- Support for `region` parameter to specify the AWS region for the resources created if different from the provider region.
15+
16+
### Modified
17+
18+
- Variable definitions now contain detailed `object` types in place of the previously used `any` type.
19+
- Security group rules now use a default naming scheme of `<security-group-name>-<map-key>` unless a more specific rule name is provided.
20+
- `rule.actions.type` has been replaced with `rule.actions.<type>`. See before/after below for more details.
21+
- `query_string` supports a list of key:value pairs; type definition updated to support this (i.e. was `map(string)` and is now `list(map(string))`)
22+
23+
### Removed
24+
25+
- None
26+
27+
### Variable and output changes
28+
29+
1. Removed variables:
30+
31+
- None
32+
33+
2. Renamed variables:
34+
35+
- None
36+
37+
3. Added variables:
38+
39+
- None
40+
41+
4. Removed outputs:
42+
43+
- None
44+
45+
5. Renamed outputs:
46+
47+
- None
48+
49+
6. Added outputs:
50+
51+
- None
52+
53+
## Upgrade Migrations
54+
55+
### Diff of Before vs After
56+
57+
```diff
58+
module "alb" {
59+
source = "terraform-aws-modules/alb/aws"
60+
- version = "9.17.0"
61+
+ version = "10.0.0"
62+
63+
listeners = {
64+
ex-http-https-redirect = {
65+
port = 80
66+
protocol = "HTTP"
67+
redirect = {
68+
port = "443"
69+
protocol = "HTTPS"
70+
status_code = "HTTP_301"
71+
}
72+
73+
rules = {
74+
ex-fixed-response = {
75+
priority = 3
76+
actions = [{
77+
# Same for all action types, not just `fixed_response`
78+
- type = "fixed-response"
79+
+ fixed_response = {
80+
content_type = "text/plain"
81+
status_code = 200
82+
message_body = "This is a fixed response"
83+
+ }
84+
}]
85+
86+
conditions = [{
87+
- query_string = {
88+
+ query_string = [{
89+
key = "weighted"
90+
value = "true"
91+
- }
92+
+ }]
93+
}]
94+
}
95+
}
96+
}
97+
}
98+
}
99+
```
100+
101+
## Terraform State Moves
102+
103+
None required
File renamed without changes.
File renamed without changes.

docs/patterns.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,12 @@ module "alb" {
226226
weighted_forward = {
227227
target_groups = [
228228
{
229-
target_group_key = "ex-lambda-with-trigger"
230-
weight = 60
229+
key = "ex-lambda-with-trigger"
230+
weight = 60
231231
},
232232
{
233-
target_group_key = "ex-lambda-without-trigger"
234-
weight = 40
233+
key = "ex-lambda-without-trigger"
234+
weight = 40
235235
}
236236
]
237237
}
@@ -257,7 +257,7 @@ module "alb" {
257257
258258
module "lambda_with_allowed_triggers" {
259259
source = "terraform-aws-modules/lambda/aws"
260-
version = "~> 6.0"
260+
version = "~> 8.0"
261261
262262
# Truncated for brevity ...
263263
@@ -271,7 +271,7 @@ module "lambda_with_allowed_triggers" {
271271
272272
module "lambda_without_allowed_triggers" {
273273
source = "terraform-aws-modules/lambda/aws"
274-
version = "~> 6.0"
274+
version = "~> 8.0"
275275
276276
# Truncated for brevity ...
277277

examples/complete-alb/README.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,31 @@ Note that this example may create resources which cost money. Run `terraform des
1919

2020
| Name | Version |
2121
|------|---------|
22-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.99 |
22+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.5 |
2424
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.0 |
2525
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.6 |
2626

2727
## Providers
2828

2929
| Name | Version |
3030
|------|---------|
31-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.99 |
31+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.5 |
3232
| <a name="provider_null"></a> [null](#provider\_null) | >= 2.0 |
3333
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.6 |
3434

3535
## Modules
3636

3737
| Name | Source | Version |
3838
|------|--------|---------|
39-
| <a name="module_acm"></a> [acm](#module\_acm) | terraform-aws-modules/acm/aws | ~> 4.0 |
39+
| <a name="module_acm"></a> [acm](#module\_acm) | terraform-aws-modules/acm/aws | ~> 5.0 |
4040
| <a name="module_alb"></a> [alb](#module\_alb) | ../../ | n/a |
4141
| <a name="module_alb_disabled"></a> [alb\_disabled](#module\_alb\_disabled) | ../../ | n/a |
42-
| <a name="module_lambda_with_allowed_triggers"></a> [lambda\_with\_allowed\_triggers](#module\_lambda\_with\_allowed\_triggers) | terraform-aws-modules/lambda/aws | ~> 6.0 |
43-
| <a name="module_lambda_without_allowed_triggers"></a> [lambda\_without\_allowed\_triggers](#module\_lambda\_without\_allowed\_triggers) | terraform-aws-modules/lambda/aws | ~> 6.0 |
44-
| <a name="module_log_bucket"></a> [log\_bucket](#module\_log\_bucket) | terraform-aws-modules/s3-bucket/aws | ~> 3.0 |
45-
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 5.0 |
46-
| <a name="module_wildcard_cert"></a> [wildcard\_cert](#module\_wildcard\_cert) | terraform-aws-modules/acm/aws | ~> 4.0 |
42+
| <a name="module_lambda_with_allowed_triggers"></a> [lambda\_with\_allowed\_triggers](#module\_lambda\_with\_allowed\_triggers) | terraform-aws-modules/lambda/aws | ~> 8.0 |
43+
| <a name="module_lambda_without_allowed_triggers"></a> [lambda\_without\_allowed\_triggers](#module\_lambda\_without\_allowed\_triggers) | terraform-aws-modules/lambda/aws | ~> 8.0 |
44+
| <a name="module_log_bucket"></a> [log\_bucket](#module\_log\_bucket) | terraform-aws-modules/s3-bucket/aws | ~> 5.0 |
45+
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 6.0 |
46+
| <a name="module_wildcard_cert"></a> [wildcard\_cert](#module\_wildcard\_cert) | terraform-aws-modules/acm/aws | ~> 5.0 |
4747

4848
## Resources
4949

@@ -54,14 +54,11 @@ Note that this example may create resources which cost money. Run `terraform des
5454
| [aws_cognito_user_pool_domain.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cognito_user_pool_domain) | resource |
5555
| [aws_instance.other](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance) | resource |
5656
| [aws_instance.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance) | resource |
57-
| [aws_vpc_ipam.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_ipam) | resource |
58-
| [aws_vpc_ipam_pool.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_ipam_pool) | resource |
59-
| [aws_vpc_ipam_pool_cidr.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_ipam_pool_cidr) | resource |
6057
| [null_resource.download_package](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
6158
| [random_string.this](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string) | resource |
6259
| [aws_availability_zones.available](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones) | data source |
6360
| [aws_route53_zone.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/route53_zone) | data source |
64-
| [aws_ssm_parameter.al2](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ssm_parameter) | data source |
61+
| [aws_ssm_parameter.al2023](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ssm_parameter) | data source |
6562

6663
## Inputs
6764

0 commit comments

Comments
 (0)