Severity Framework
Snyk CCSS
Rule category
General / Restoration
Is your enviroment affected by this misconfiguration?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsFrameworks
- Snyk ID SNYK-CC-00264
- credit Snyk Research Team
Description
Availability of the service may be impacted if unhealthy instances are not replaced.
How to fix?
Set replace_unhealthy_instances
attribute to true
.
Example Configuration
resource "aws_ec2_fleet" "fleet1" {
launch_template_config {
launch_template_specification {
launch_template_id = "aws_launch_template.example.id"
version = "aws_launch_template.example.latest_version"
}
}
target_capacity_specification {
default_target_capacity_type = "spot"
total_target_capacity = 5
}
replace_unhealthy_instances = true
}