Skip to content

codebuild: project creation fails when GitHub source webhook is enabled #31726 #33

@QuantumNeuralCoder

Description

@QuantumNeuralCoder

import * as codebuild from 'aws-cdk-lib/aws-codebuild';

export class CodebuildGhaCdkStack extends cdk.Stack {
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
const project = new codebuild.Project(this, 'MyProject', {
source: codebuild.Source.gitHub({
owner: 'YOUR_GITHUB_NAME',
repo: 'YOUR_REPOSITORY_NAME',
webhookFilters: [codebuild.FilterGroup.inEventOf(codebuild.EventAction.WORKFLOW_JOB_QUEUED)],
}),
});
// uncommenting this makes it work
// project.role!.addManagedPolicy(ManagedPolicy.fromAwsManagedPolicyName('AdministratorAccess'));
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions