turbot/steampipe-mod-aws-compliance

Control: Cloudformation stacks termination protection should be enabled

Description

Ensure that AWS CloudFormation stacks have termination protection feature enabled in order to protect them from being accidentally deleted. The safety feature can be enabled when you create the CloudFormation stack or for existing stacks using the AWS API (UpdateTerminationProtection command).

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.cloudformation_stack_termination_protection_enabled

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run aws_compliance.control.cloudformation_stack_termination_protection_enabled --share

SQL

This control uses a named query:

select
id as resource,
case
when enable_termination_protection then 'ok'
else 'alarm'
end as status,
case
when enable_termination_protection then title || ' termination protection enabled.'
else title || ' termination protection disabled.'
end as reason
, region, account_id
from
aws_cloudformation_stack;

Tags