Skip to main content
All CollectionsActionsAmazon Web Services
Delete CloudFormation Stacks Actions
Delete CloudFormation Stacks Actions
Matt Houser avatar
Written by Matt Houser
Updated over 6 years ago

Description

The Delete CloudFormation Stacks action is used to delete one or more CloudFormation stacks.

For example, at 8pm, all development stacks can be deleted.

Test Mode

The Delete CloudFormation Stacks action includes a "test mode" as a way of determining which items will be deleted without actually deleting the items. This way, you can fine tune your action without concern for deleting the wrong items. Test Mode is on by default.

When test mode is enabled, execute your action normally then check the action logs to verify that only items that should have been deleted would have been deleted, and that items that should not have been deleted would not have been deleted.

When you are satisfied, disable Test Mode.

Settings

Please see Common Action Settings for a description of settings common to all action types.

Stack Identification Method

Indicates the method used to select CloudFormation stacks. Valid choices are:

  • By Stack Name

  • By Resource Tag

  • All Stacks

Stack Name

Required when Stack Identification Method is set to "By Stack Name". Indicates the comparison method against the stack's name. Those with matching stack names will be deleted.

Resource Tag Name

Required when Stack Identification Method is "By Resource Tag". Indicates the name of the resource tag used for comparison.

Resource Tag Value

Required when Stack Identification Method is "By Resource Tag". Indicates the comparison method against the resource tag named by Resource Tag Name. Those with matching tag values will be deleted.

Minimum Stack Age

Indicate whether the stack must be of a minimum age in order to be deleted.

Older Than

Specifies the minimum age (in days) of stacks to be deleted.

Minimum Days Since Last Update

Indicate whether the stack must not have been updated within a minimum number of days in order to be deleted.

Last Updated More Than

Stacks that have been updated more recently than this number of days will not be deleted.

Test Mode

Enables and disabled Test Mode (see above).

Amazon Commands Used

The following Amazon AWS commands are used. The access key should have permission to execute all of them.

  • cloudformation:DeleteStack

  • cloudformation:DescribeStacks

Did this answer your question?