Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pipeline): enable logging on github action runner #814

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mmalenic
Copy link
Member

Closes #812

Changes

Comment on lines +33 to +45
// Based on https://github.com/aws/aws-cdk/blob/2b2443de2f566f1595657f94195d8b61243fb800/packages/aws-cdk-lib/aws-codebuild/lib/project.ts#L1328-L1342
const logGroupArn = Stack.of(this).formatArn({
service: 'logs',
resource: 'log-group',
arnFormat: ArnFormat.COLON_RESOURCE_NAME,
resourceName: `/aws/codebuild/${name}`,
});
ghRunnerRole.addToPolicy(
new PolicyStatement({
resources: [logGroupArn, `${logGroupArn}:*`],
actions: ['logs:CreateLogGroup', 'logs:CreateLogStream', 'logs:PutLogEvents'],
})
);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not certain that this is correct, is there a way I can test it?

Otherwise, I could also just allow on all resources using *.

@mmalenic mmalenic self-assigned this Jan 17, 2025
@mmalenic mmalenic added pipeline Workflow/Pipeline Manager fix labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pipeline Workflow/Pipeline Manager
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: github action runner build project should enable logging
1 participant