CloudFormation StackSet deletions must not purge stacks and their associated resources. Purging can irreversibly delete resources, causing data loss or service interruption. For Ansible tasks using the community.aws.cloudformation_stack_set module, the purge_stacks property must be explicitly set to the boolean value false. Resources missing purge_stacks or with purge_stacks: true are flagged.
- name:Create or update StackSet without purging stacks on deletioncommunity.aws.cloudformation_stack_set:name:my-stack-settemplate:/path/to/template.yamlparameters:Param1:valuepurge_stacks:false
Compliant Code Examples
- name:Create a stack set with instances in two accountscommunity.aws.cloudformation_stack_set:name:my-stackdescription:Test stack in two accountsstate:presenttemplate_url:https://s3.amazonaws.com/my-bucket/cloudformation.templateaccounts:[1234567890,2345678901]regions:- us-east-1purge_stacks:false
Non-Compliant Code Examples
- name:Create a stack set with instances in two accountscommunity.aws.cloudformation_stack_set:name:my-stack2description:Test stack in two accountsstate:presenttemplate_url:https://s3.amazonaws.com/my-bucket/cloudformation.templateaccounts:[1234567890,2345678901]regions:- us-east-1- name:onsubsequent calls, templates are optional but parameters and tags can be alteredcommunity.aws.cloudformation_stack_set:name:my-stack3state:presentparameters:InstanceName:my_stacked_instancetags:foo:bartest:stackaccounts:[1234567890,2345678901]regions:- us-east-1purge_stacks:true
1
2
rulesets:- Ansible / AWS # Rules to enforce / AWS.
맞춤형 데모 요청
Datadog 시작하기
Ask AI
AI-generated responses may be inaccurate. Verify important info.