CmdID

CmdID / aws / aws cloudformation

aws cloudformation create-stack-refactor

Creates a refactor across multiple stacks, with the list of stacks and resources that are affected. AWS CLI reference

1 example 4 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To create the stack definition for a stack refactor operation

The following create-stack-refactor example creates the stack definition for stack refactoring.

aws cloudformation create-stack-refactor --stack-definitions StackName=Stack1,TemplateBody@=file://template1-updated.yaml StackName=Stack2,TemplateBody@=file://template2-updated.yamlIdentify
--stack-definitionsThe stacks being refactored.

Contents of template1-updated.yaml:

AWSTemplateFormatVersion: "2010-09-09"
Resources:
  MyBucket:
    Type: AWS::S3::Bucket

Contents of template2-updated.yaml:

AWSTemplateFormatVersion: "2010-09-09"
Resources:
  MyQueue:
    Type: AWS::SQS::Queue
  MyTopic:
    Type: AWS::SNS::Topic
Its output
{
    "StackRefactorId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
}

For more information, see Stack refactoring in the AWS CloudFormation User Guide.

Options

4 in the AWS CLI reference
--descriptionA description to help you identify the stack refactor.
--enable-stack-creationDetermines if a new stack is created with the refactor.
--resource-mappingsThe mappings for the stack resource Source and stack resource Destination.
--stack-definitionsThe stacks being refactored.