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(elasticbeanstalk): add new check elasticbeanstalk_enhanced_health_reporting_enabled #5348

Conversation

MarioRgzLpz
Copy link
Member

Context

Add a new check to make sure enhanced health reporting is enabled for AWS Elastic Beanstalk environments. The control fails if enhanced health reporting is not enabled.

Enhanced health reporting provides a more detailed view of the health of the underlying infrastructure, allowing for quicker responses to changes that could affect application availability. It helps gauge the severity of issues and pinpoint possible causes by evaluating logs and metrics from environment EC2 instances.

Description

Added a new check elasticbeanstalk_enhanced_health_reporting_enabled with respective unit tests and metadata.

Checklist

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@MarioRgzLpz MarioRgzLpz requested review from a team as code owners October 9, 2024 13:08
Base automatically changed from PRWLR-4315-create-new-service-for-elastic-beanstalk to master October 9, 2024 13:29
@MarioRgzLpz MarioRgzLpz changed the title feat(elasticbeanstalk): Ensure Elastic Beanstalk environments have enhanced health reporting enabled feat(elasticbeanstalk): add new check elasticbeanstalk_enhanced_health_reporting_enabled Oct 9, 2024
…should-have-enhanced-health-reporting-enabled
@github-actions github-actions bot added the provider/aws Issues/PRs related with the AWS provider label Oct 11, 2024
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.36%. Comparing base (c3e3381) to head (3441ccc).
Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5348   +/-   ##
=======================================
  Coverage   89.36%   89.36%           
=======================================
  Files        1022     1023    +1     
  Lines       31382    31434   +52     
=======================================
+ Hits        28044    28091   +47     
- Misses       3338     3343    +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 19 to 22
if (
environment.health_reporting is None
or environment.health_reporting != "enhanced"
):
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (
environment.health_reporting is None
or environment.health_reporting != "enhanced"
):
if environment.health_reporting != "enhanced":

@@ -0,0 +1,34 @@
{
"Provider": "aws",
"CheckID": "elasticbeanstalk_enhanced_health_reporting_enabled",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"CheckID": "elasticbeanstalk_enhanced_health_reporting_enabled",
"CheckID": "elasticbeanstalk_environment_enhanced_health_reporting",

@sergargar sergargar merged commit a6db526 into master Oct 11, 2024
11 checks passed
@sergargar sergargar deleted the PRWLR-4510-elastic-beanstalk-environments-should-have-enhanced-health-reporting-enabled branch October 11, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider/aws Issues/PRs related with the AWS provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants