-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(codebuild): add support for Source Credentials #6722
feat(codebuild): add support for Source Credentials #6722
Conversation
username: cdk.SecretValue.secretsManager('my-bitbucket-creds', { jsonField: 'username' }), | ||
password: cdk.SecretValue.secretsManager('my-bitbucket-creds', { jsonField: 'password' }), | ||
}); | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't it mean you will commit your password into code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. This will result in a SecretsManager dynamic reference being inserted into the template, and only resolved at deploy time. More details: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#dynamic-references-secretsmanager
This is our standard mechanism for handling secrets in CDK code.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
I have the feeling this change broke something when we use CodePipeline with CodeCommit... Before this change, creating my pipeline was resulting into something like this (following templates are examples):
and now it is:
The As a result, the stack cannot be deployed and the following error is raised: Reverting back to 1.28.0 fixes the issue. |
@ben8p can you open us a separate bug for this, showing also your code that illustrates when this happens? Also, feel free to use GitHub Gists for larger things like the resulting template fragments. Thanks, |
Took me ages to find out the minimal reproduction path! |
Thanks! I'll take a look today. |
This allows automating providing credentials to CodeBuild projects, without the need to do it manually through the AWS Console.
Fixes #2086
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license