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(aws_instance): treat missing data on cloudwatchmetric #184

Merged

Conversation

haidargit
Copy link
Contributor

what

The PR enables the treat_missing_data argument for the cloudwatch metric alarm resource on this ec2 module.

resource "aws_cloudwatch_metric_alarm" "default" {

why

Users may have specific run schedules, triggering alerts in CloudWatch, e.g., for missing data during offline periods (instance stopped state, hibernate, restart, etc.).
This treat_missing_data variable will enable the CloudWatch alarms to set custom responses, which are "missing", "ignore", "breaching" and "notBreaching", for the data gaps that occur and keep the EC2 alarms condition in a desired state.

references


Kindly review this PR for any possible improvements. Thank you

@haidargit haidargit requested review from a team as code owners February 2, 2024 01:47
@haidargit
Copy link
Contributor Author

Hi @johncblandii, @joe-niland
could you help review the PR for the improvement? Thanks!

Copy link
Member

@joe-niland joe-niland left a comment

Choose a reason for hiding this comment

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

@haidargit looks good. I think it would help to add input validation for this variable.

variables.tf Outdated Show resolved Hide resolved
@haidargit haidargit force-pushed the feature/cloudwatch-treat-missing-data branch from 7ec3fe6 to 45ec3c3 Compare February 9, 2024 03:15
Co-authored-by: Joe Niland <[email protected]>
@haidargit
Copy link
Contributor Author

Validation added, @joe-niland, Thanks for the correction!

…idargit/terraform-aws-ec2-instance into feature/cloudwatch-treat-missing-data
@joe-niland
Copy link
Member

/terratest

@haidargit
Copy link
Contributor Author

variable added on examples/complete/main.tf

Thanks

@joe-niland
Copy link
Member

/terratest

@joe-niland joe-niland added the patch A minor, backward compatible change label Feb 9, 2024
@joe-niland joe-niland enabled auto-merge (squash) February 9, 2024 03:59
@joe-niland joe-niland merged commit 9010cc0 into cloudposse:main Feb 9, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch A minor, backward compatible change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants