Cortex CloudApplication Security
AWS API deployments do not enable Create before Destroy misconfiguration detected in code
Rule Details
Cortex AppSec Rule ID
APPSEC_AWS_217
Category - Subcategory
Compute - Unsanctioned Resource Or Type
Provider
AWS
Severity
LOW
Framework
Terraform
Impact
It is recommended to enable create_before_destroy argument inside the resource lifecycle configuration block to avoid possible return errors such as BadRequestException: Active stages pointing to this deployment must be moved or deleted on recreation.
How to Fix
[source,go]
resource "aws_api_gateway_deployment" "example" { rest_api_id = aws_api_gateway_rest_api.example.id stage_name = "example"
lifecycle {
create_before_destroy = true
} }
PreviousAWS Batch Job is defined as a privileged container misconfiguration detected in code
NextAWS DMS replication instance automatic version upgrade disabled misconfiguration detected in code
Last updated
Was this helpful?
