-
-
Notifications
You must be signed in to change notification settings - Fork 557
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: Add support for aws_autoscaling_policy #175
feat: Add support for aws_autoscaling_policy #175
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start. Please update the code in the examples
and docs in README.
Agreed, I'll update them and will let you know once it's done, thank you :) |
Great message! I was just looking for this solution today while modifying the code. |
@antonbabenko I've added example based on average CPU load and added missing outputs |
c19985d
to
dc37c99
Compare
@bryantbiggs Hey, TYVM for the review & changes I've implemented them, slightly tested by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (almost)
README.md
Outdated
create_scaling_policy = true | ||
scaling_policies = { | ||
my-policy = { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you put at least a smallest possible (required set) example into my-policy
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good. There are few remaining comments, also please update outputs in examples
, and make CI green&passing. Thanks!
BTW, I'm seeing Also I forgot to mention, in previous review round, I implemented |
This is how GitHub is working for us. You don't need to wait for GitHub Actions to run after you commit, because you can run I've just run it locally. Thank you very much for this PR! I am going to merge it now. |
## [4.11.0](v4.10.0...v4.11.0) (2022-01-17) ### Features * Add support for aws_autoscaling_policy ([#175](#175)) ([a8ba844](a8ba844))
This PR is included in version 4.11.0 🎉 |
Huge thank you! In this PR I learned good practices and looking forward to contribute to your modules, next time it'll be much less to review ;) |
You are more than welcome! We have plenty of work to do in |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
This PR adds support for aws_autoscaling_policy resource
Support is fully complete and covers all settings mentioned in documentation(https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy)
Motivation and Context
I decided to implement support for this resource, as it's a part of ASGs, brings (important in my opinion) feature to scale-in / scale out based on CPU load metric (predefined_metric_type = ASGAverageCPUUtilization)
How Has This Been Tested?
examples/*
projectsI tested this PR creating ASG with addition of following block of code:
In
terraform plan
I see following result:I also made a test without it, as variables have default value of
false
andnull
, it does not break anything