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 回答
0
已接受的回答

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
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则