Skip to content

CloudFormation - Using Triggers parameter CodePipeline V2 keep getting internal error

0

I am getting 'Internal Failure' error message when i add 'Triggers' parameter for CodePipeline. There is no other error message. Is this parameter supported?

...
Pipeline1:
        Type: "AWS::CodePipeline::Pipeline"
        Properties:
            Name: !Sub "${AWS::StackName}--pipeline"
            RoleArn: !GetAtt CodePipelineIAMRole.Arn
            ArtifactStore: 
                Location: !Ref S3Bucket
                Type: "S3"
            PipelineType: V2
            ExecutionMode: PARALLEL
            Triggers:
                -
                  GitConfiguration: 
                      SourceActionName: 'Source'
                      Push: 
                        - Branches: 
                            Includes: 
                              - !Sub "${RepoBranchName}"
                          FilePaths: 
                            Includes: 
                              - !Sub "${RootFolder}/requirements.txt"
                  ProviderType: "CodeStarSourceConnection"
...
1 Answer
1

Hello.

Looking at the examples in the documentation, it looks like it can be used with V2 as well.
An example from the document is as follows.
You may want to check if "SourceActionName" is correct.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codepipeline-pipeline.html#aws-resource-codepipeline-pipeline--examples

      Triggers:
        - ProviderType: CodeStarSourceConnection
          GitConfiguration:
            Push:
              - Tags:
                  Excludes:
                    - beta-*
                  Includes:
                    - release-*
              - Branches:
                  Excludes:
                    - beta-*
                  Includes:
                    - release-*
                FilePaths:
                  Includes:
                    - projectA/**
                    - common/**/*.js
                  Excludes:
                    - '**/README.md'
                    - '**/LICENSE'
                    - '**/CONTRIBUTING.md'
            PullRequest:
              - Branches:
                  Excludes:
                    - stable-v1-*
                  Includes:
                    - stable-*
                    - release-*
                FilePaths:
                  Includes:
                    - projectA/**
                    - common/**/*.js
                  Excludes:
                    - '**/README.md'
                    - '**/LICENSE'
                    - '**/CONTRIBUTING.md'
                Events:
                  - CLOSED
            SourceActionName: !Ref SourceActionName
EXPERT

answered 2 years ago

EXPERT

reviewed 2 years 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.