Skip to content

Releases: cloudposse/terraform-aws-ec2-autoscale-group

v0.39.0

06 Nov 19:09
8a38b85
Compare
Choose a tag to compare
Change mixed instances policy fields to optional @pagmerek (#126)

what

  • change variable field of mixed_instances_policy to optional

why

In my other PR for terraform ECS component I changed the default value of variable that is being passed here. Without this change terraform will complain that there is no such field as instances_distribution/override

references

NOTE: This PR must be merged first and then I will change version of ASG component in ECS component

v0.38.0

02 Nov 18:33
aa3840e
Compare
Choose a tag to compare

🚀 Enhancements

Add optional network_interface_id variable @gbarna-bd (#124)

what

  • Add optional network_interface_id variable to launch_template

why

  • Allow the attaching of existing network interfaces

references

v0.37.2

01 Nov 14:24
ba1e6ce
Compare
Choose a tag to compare

🚀 Enhancements

Require AWS provider 5.16+ @raymondchen625 (#123)

what

Version v0.36.0 does not work with AWS Provider 4.X.

why

In PR #121 of v0.36.0, the preference key scale_in_protected_instances, which had been available only since AWS Provider 5.16.0 introduced by PR#33310, was added. That basically upgrades the required AWS provider version to 5.16.0+.
We will get errors like the below while planning with AWS provider <5.16.0:

│ Error: Unsupported argument
│
│   on .terraform/modules/autoscale_group/main.tf line 187, in resource "aws_autoscaling_group" "default":
│  187:           scale_in_protected_instances = lookup(preferences.value, "scale_in_protected_instances", null)
│
│ An argument named "scale_in_protected_instances" is not expected here.

references

🐛 Bug Fixes

Require AWS provider 5.16+ @raymondchen625 (#123)

what

Version v0.36.0 does not work with AWS Provider 4.X.

why

In PR #121 of v0.36.0, the preference key scale_in_protected_instances, which had been available only since AWS Provider 5.16.0 introduced by PR#33310, was added. That basically upgrades the required AWS provider version to 5.16.0+.
We will get errors like the below while planning with AWS provider <5.16.0:

│ Error: Unsupported argument
│
│   on .terraform/modules/autoscale_group/main.tf line 187, in resource "aws_autoscaling_group" "default":
│  187:           scale_in_protected_instances = lookup(preferences.value, "scale_in_protected_instances", null)
│
│ An argument named "scale_in_protected_instances" is not expected here.

references

v0.37.1

01 Nov 14:18
dbe9e75
Compare
Choose a tag to compare
fix: block_device_mappings required optional fields @MaxymVlasov (#127)

what

Fix 0.37.0

│ Error: Invalid value for input variable
│ 
│   on main.tf line 125, in module "autoscale_group":
│  125:   block_device_mappings       = var.block_device_mappings
│ 
│ The given value is not suitable for
│ module.autoscale_group.var.block_device_mappings declared at
│ .terraform/modules/autoscale_group/variables.tf:72,1-33: incorrect list
│ element type: attribute "ebs": attribute "throughput" is required.
╵

why

As per the code in main.tf, all these stuff are optional

https://github.com/cloudposse/terraform-aws-ec2-autoscale-group/blob/b757eb9037b9eae3235522800530117e66d535b2/main.tf#L6-L24

references

#97

🤖 Automatic Updates

Update Terraform cloudposse/dynamic-subnets/aws to v2.4.1 @renovate (#125)

This PR contains the following updates:

Package Type Update Change
cloudposse/dynamic-subnets/aws (source) module minor 2.3.0 -> 2.4.1

Release Notes

cloudposse/terraform-aws-dynamic-subnets (cloudposse/dynamic-subnets/aws)

v2.4.1

Compare Source

🚀 Enhancements

Add subnet ARNs to outputs @​Nuru (#​188)

what

  • Add subnet ARNs to outputs

why

v2.4.0

Compare Source

Update dependencies, remove deprecation, add NACL example @​Nuru (#​184)

Note

Dropping support for deprecated EC2-Classic

With this release, EIPs allocated for NAT ingress are allocated in the default domain. This most likely does not affect you, but for accounts created before 2013-12-04 (almost 10 years ago as of this writing), the default domain could be EC2-Classic rather than the current VPC. Previously this module forced the EIPs to be in the VPC domain, but the breaking changes between AWS Provider v4 and v5 make that difficult.

If you find yourself in the rare situation where the EIPs allocated by this module are in EC2-Classic but you want them in VPC, then create the EIPs outside of this module and supply them to this module via nat_elastic_ips.

Custom NACLs

This release includes an example (examples/nacls/) showing how to create custom NACLs in conjunction with this module. Note that by default, this module creates wide-open NACLs, and subnets can only have one NACL associated with them. If you try to add a NACL to a subnet without disabling the default NACLs, you may get a possibly confusing error like:

│ Error: creating EC2 Network ACL: creating EC2 Network ACL (acl-0376c5f12dd9d784d) Association: InvalidAssociationID.NotFound: The association ID 'aclassoc-0818d5a9e3876a2bb' does not exist

See https://github.com/hashicorp/terraform-provider-aws/issues/31888

what

  • Make appropriate inputs non-nullable (treat an input of null as meaning "default")
  • Remove aws_eip vpc = true
  • Update terraform cloudposse/utils/aws to v1.3.0 (Supersedes and closes #​182)
  • Add example of how to add custom NACLs to subnets created by this module (Supersedes and closes #​176)
  • Update tests and test framework

why

  • Allow better, more consistent configuration
  • Deprecated
  • Include support for new AWS regions
  • Encourage composition of modules and resources rather than aggregation of functionality into bloated modules (c.f. #​176)
  • Stay current with features, bug fixes, and security updates

references


v0.37.0

26 Oct 18:29
b757eb9
Compare
Choose a tag to compare
* add throughput to block_device_mapping @zaksamalik (#97)

what

  • add throughput to block_device_mapping

why

  • allows throughput configuration for block device mappings

references

v0.36.0

20 Oct 22:14
7bf4736
Compare
Choose a tag to compare

🚀 Enhancements

Fix: instance refresh missing properties @ebarriosjr (#121)

what

This PR adds two missing properties to the instance_refresh stanza.

why

Right now there is no way to configure scale_in_protected_instances and standby_instances in the instance refresh stanza.

references

This solves: #120

🤖 Automatic Updates

Update README.md and docs @cloudpossebot (#122)

what

This is an auto-generated PR that updates the README.md and docs

why

To have most recent changes of README.md and doc from origin templates

v0.35.1

20 Jul 15:06
995f0ea
Compare
Choose a tag to compare
add instance refresh preferences @scott-doyland-burrows (#115)

what

Adds skip_matching and auto_rollback to the instance refresh preferences.

Allows the instance refresh preferences to be optional. If the values are not set in the calling module, then the default values are used as per:

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#instance_refresh

why

Previously it was not possible to set the skip_matching and auto_rollback.

It was also not possible to omit preferences from the calling module and just use the defaults instead.

With this change we can now set preferences and/or omit preferences that we wish to use the defaults for.

The change should not cause any diffs in current infrastructure.

references

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#instance_refresh

examples

It is now possible to use something such as this to use defaults:

  instance_refresh = ({
    strategy = "Rolling"
  })

or this to override certain defaults:

  instance_refresh = ({
    strategy = "Rolling"
    preferences = ({
      min_healthy_percentage = 50
      skip_matching          = true
    })
    triggers = ["tags"]
  })

🤖 Automatic Updates

Update README.md and docs @cloudpossebot (#119)

what

This is an auto-generated PR that updates the README.md and docs

why

To have most recent changes of README.md and doc from origin templates

v0.35.0

22 Jun 13:18
dce3c32
Compare
Choose a tag to compare
Made spot_options in instance_market_options optional @skjensen (#117)

what

Made spot_options in instance_market_options optional.

why

On the AWS Web console there is an option to tick a box that provides guidance on how to create a Launch Template, there works with an EC2 Auto scaling group.

Expanding the "Advanced details" ticking "Request spot instance" you will see most of the options are marked as "Don't include in launch template (recommended)"

Expiry date and Interruption behaviour are not applicable. Having all spot_options as required in this template makes it impossible to enable spot instances in an EC2 Auto Scaling group.

On a related note, but not requiring any change to the module.
The variable instance_initiated_shutdown_behavior should be set to null as it's also not allowed in the Launch Template when used for an EC2 Auto Scaling group

references

https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html

Support AWS Provider V5 @max-lobur (#116)

what

Support AWS Provider V5
Linter fixes

why

Maintenance

references

https://github.com/hashicorp/terraform-provider-aws/releases/tag/v5.0.0

v0.34.2

01 Jun 21:56
f73f283
Compare
Choose a tag to compare

🐛 Bug Fixes

Restore tags output @Nuru (#114)

what

  • Restore autoscaling_group_tags output removed in #113

why

  • Maintain backwards compatibility

v0.34.1

31 May 09:13
b45ad5e
Compare
Choose a tag to compare
Sync github @max-lobur (#110)

Rebuild github dir from the template

🚀 Enhancements

Support AWS Provider V5 @max-lobur (#113)

what

  • Support AWS Provider V5
  • Linter fixes
  • Bump tf version

why

resource/aws_autoscaling_group: Remove deprecated tags attribute (hashicorp/terraform-provider-aws#30842)

references

https://github.com/hashicorp/terraform-provider-aws/releases/tag/v5.0.0