Hello everyone. I am trying to use Pulumi to crea...
# typescript
s
Hello everyone. I am trying to use Pulumi to create an AWS codebuild resource, but the documentation is a little unclear on how to connect to a private GitHub repo. The projectArgs#source property docs (https://pulumi.io/reference/pkg/nodejs/pulumi/aws/codebuild/#ProjectArgs-source) say that the
Source blocks are documented below
but they don't actually seem to be documented anywhere. Are there any examples of how to do what I need?
g
Hi Juliano, sorry this is unclear... unfortunately the way our docs are generated currently leads to some ambiguous blocks like this.
When you say private GitHub repo, do you mean a repo on github.com that is marked as private? Or a GitHub Enterprise install?
s
No worries. This is a repository on github.com tht is marked as private and requires corporate SSO access
I have a personal access token I can use on the codebuild side to talk to the repo. But I'm unsure on how to configure this using Pulumi
c
Based on the AWS docs itself, it appears that one can only specify the source repo creds for a codebuild project using the UI only. Search for “The only valid value is OAUTH” on https://docs.aws.amazon.com/cli/latest/reference/codebuild/create-project.html. Based on what I am seeing, you may need to first authorize your repo on github.com from the AWS console by starting to create a codebuild project, but don’t actually finish creating it. Then using Pulumi just setup the project resource normally by just specifying any applicable properties, except for the
auths
property. I believe once AWS has the OAuth authorization in the console, you should be able to specify repos which would use that existing connection automatically.
s
hm that's unfortunate. Alright thank you for your help