CodePipeline Cross Region Deployment using CFT

0

I want to create a code pipeline with 3 stages source and build stage should in region A and deploy stage should be in another region B. How to write a cloud formation template or terraform to achieve this

1 Answer
0
Accepted Answer

You can read this blog post that explains how to create a multi-region deployment with AWS CodePipeline.

This blog post demonstrates this CloudFormation template hosted on GitHub. Essentially, you need to specify your target region in your CodeDeploy action:

          - Name: !Ref OtherRegion1
              InputArtifacts:
                - Name: Source
              ActionTypeId:
                Category: Deploy
                Owner: AWS
                Version: '1'
                Provider: CloudFormation
              Configuration:
                ActionMode: CREATE_UPDATE
                RoleArn: !GetAtt CloudFormationServiceRole.Arn
                Capabilities: CAPABILITY_IAM,CAPABILITY_AUTO_EXPAND
                StackName: !Join
                  - '-'
                  - - !Ref 'AWS::StackName'
                    - TestStack1
                TemplatePath: Source::CF/MultiRegionDeployment.yml
              RunOrder: 6
              Region: !Ref OtherRegion1
profile pictureAWS
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions