Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: roll instances + modify ASG sizes + add aqua #20

Merged
merged 2 commits into from
Feb 20, 2024

Conversation

Gowiem
Copy link
Member

@Gowiem Gowiem commented Feb 18, 2024

what

  • Updates module to roll existing ASG instances when the launch template is updated (AMI, user-data, whatever)
  • Adds aqua.yaml
  • Removes the instance_count variable and uses the actual desired_capacity, min_size, max_size variables
  • Bumps our pin of the AWS provider to 5.0+

why

  • We want these instances to update and roll off / on when we make changes to the launch template. That is part of the point!
  • Adds aqua so we can keep standard tooling versions across users.
  • Removes the instance count var because it was holding back full control and helps in rolling instances
  • Bump AWS provider to keep folks who are using this module moving forward + keeps us on the latest ASG resource config

references

  • N/A

Copy link
Member

@gberenice gberenice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
A couple of small comment + I suggest to update the default type to t4g.nano. What do you think?


max_size = var.instance_count
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've never noticed that it's implemented like that. Good call 👍

main.tf Outdated
desired_capacity = var.desired_capacity

# We don't care to protect from scale in by default, as we want to roll instances frequently
protect_from_scale_in = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is false by default.

What if we add a variable protect_from_scale_in, and set it to false in case a user wants to protect an instance, AND add the attribute scale_in_protected_instances to aws_autoscaling_group:

scale_in_protected_instances - (Optional) Behavior when encountering instances protected from scale in are found. Available behaviors are Refresh, Ignore, and Wait. Default is Ignore.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Will do.

Copy link
Member

@gberenice gberenice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Gowiem Gowiem merged commit 9adca81 into main Feb 20, 2024
@Gowiem Gowiem deleted the feature/refresh-instances branch February 20, 2024 20:12
@oycyc oycyc restored the feature/refresh-instances branch May 15, 2024 18:38
@oycyc oycyc deleted the feature/refresh-instances branch May 15, 2024 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants