Skip to content

Commit bcc2455

Browse files
authored
feat!: Upgrade AWS provider and min required Terraform version to 6.0 and 1.5.7 respectively (#294)
* feat!: Upgrade AWS provider and min required Terraform version to `6.0` and `1.5.7` respectively * feat: Add upgrade guide and update example * chore: Update variable description
1 parent fa085b2 commit bcc2455

File tree

13 files changed

+1949
-1193
lines changed

13 files changed

+1949
-1193
lines changed

README.md

Lines changed: 34 additions & 34 deletions
Large diffs are not rendered by default.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/UPGRADE-9.0.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Upgrade from v8.x to v9.x
2+
3+
If you have any questions regarding this upgrade process, please consult the [`examples`](https://github.com/terraform-aws-modules/terraform-aws-autoscaling/tree/master/examples/complete) directory:
4+
If you find a bug, please open an issue with supporting configuration to reproduce.
5+
6+
## List of backwards incompatible changes
7+
8+
- Terraform v1.5.7 is now minimum supported version
9+
- AWS provider v6.0.0 is now minimum supported version
10+
11+
## Additional changes
12+
13+
### Added
14+
15+
- Support for `region` parameter to specify the AWS region for the resources created if different from the provider region.
16+
17+
### Modified
18+
19+
- Variable definitions now contain detailed `object` types in place of the previously used any type.
20+
- `mixed_instances_policy` `override` is now wrapped behind `launch_template` to match API
21+
- IMDSv2 is now enforced by default with a hop limit set to 1
22+
23+
### Variable and output changes
24+
25+
1. Removed variables:
26+
27+
- `create_scaling_policy`
28+
- `create_schedule`
29+
- `elastic_gpu_specifications` removed in `v6.0.0` of the AWS provider
30+
- `elastic_inference_accelerator` removed in `v6.0.0` of the AWS provider
31+
32+
2. Renamed variables:
33+
34+
- `delete_timeout` -> `timeouts`
35+
36+
3. Added variables:
37+
38+
- `autoscaling_group_tags_not_propagate_at_launch`
39+
- `context`
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+
### Before 8.x Example
56+
57+
```hcl
58+
module "asg" {
59+
source = "terraform-aws-modules/autoscaling/aws"
60+
version = "~> 8.0"
61+
62+
# Truncated for brevity
63+
64+
override = [
65+
{
66+
instance_type = "t3.nano"
67+
weighted_capacity = "2"
68+
},
69+
{
70+
instance_type = "t3.medium"
71+
weighted_capacity = "1"
72+
},
73+
]
74+
...
75+
}
76+
```
77+
78+
### After 9.x Example
79+
80+
```hcl
81+
module "asg" {
82+
source = "terraform-aws-modules/autoscaling/aws"
83+
version = "~> 9.0"
84+
85+
# Truncated for brevity
86+
launch_template = {
87+
override = [
88+
{
89+
instance_type = "t3.nano"
90+
weighted_capacity = "2"
91+
},
92+
{
93+
instance_type = "t3.medium"
94+
weighted_capacity = "1"
95+
},
96+
]
97+
}
98+
...
99+
}
100+
```
101+
102+
### State Changes
103+
104+
There are no required state changes to migrate from `v8.x` to `v9.x`.

examples/complete/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ Note that this example may create resources which cost money. Run `terraform des
2929

3030
| Name | Version |
3131
|------|---------|
32-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
33-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.85, < 6.0 |
32+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
33+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.0 |
3434

3535
## Providers
3636

3737
| Name | Version |
3838
|------|---------|
39-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.85, < 6.0 |
39+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.0 |
4040

4141
## Modules
4242

@@ -56,7 +56,7 @@ Note that this example may create resources which cost money. Run `terraform des
5656
| <a name="module_mixed_instance"></a> [mixed\_instance](#module\_mixed\_instance) | ../../ | n/a |
5757
| <a name="module_step_scaling_alarm"></a> [step\_scaling\_alarm](#module\_step\_scaling\_alarm) | terraform-aws-modules/cloudwatch/aws//modules/metric-alarm | ~> 4.3 |
5858
| <a name="module_target_tracking_customized_metrics"></a> [target\_tracking\_customized\_metrics](#module\_target\_tracking\_customized\_metrics) | ../../ | n/a |
59-
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 5.0 |
59+
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 6.0 |
6060
| <a name="module_warm_pool"></a> [warm\_pool](#module\_warm\_pool) | ../../ | n/a |
6161

6262
## Resources

0 commit comments

Comments
 (0)