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 Antwort
0
Akzeptierte Antwort

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
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen