aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.51k stars 3.85k forks source link

aws_codebuild: missing property for using a GitHub App credential type defined in CodeConnections #31236

Open garysassano opened 2 weeks ago

garysassano commented 2 weeks ago

Describe the feature

There's currently no way in CDK to configure a GitHub App as credential type:

image

Use Case

See above.

Proposed Solution

No response

Other Information

Related issue for Terraform AWS Provider: hashicorp/terraform-provider-aws#39011

Acknowledgements

CDK version used

2.154.1

Environment details (OS name and version, etc.)

Ubuntu 22.04.3 LTS

ashishdhingra commented 2 weeks ago

@garysassano Good afternoon. Please confirm the following:

Looks like the Auth Type GITHUBAPP (or something similar) is not yet available in CloudFormation per AWS::CodeBuild::Project SourceAuth. Please open a new issue at https://github.com/aws-cloudformation/cloudformation-coverage-roadmap so that it could be handled by CloudFormation team.

Thanks, Ashish

garysassano commented 2 weeks ago

It seems the property is already available in CfnProject as the CODECONNECTIONS type (GitHub App is actually a connection defined in CodeConnections). However, since this is an L1 construct, it isn't very user-friendly.

To implement this feature as an L2 construct, I believe you should probably extend the existing GitHubSourceCredentials by adding an alternative codeConnections property, allowing users to use that instead of the accessToken.