feat(codebuild): add support for setting a BuildEnvironment Certificate#15738
feat(codebuild): add support for setting a BuildEnvironment Certificate#15738mergify[bot] merged 3 commits intoaws:masterfrom
Conversation
|
|
||
| /** | ||
| * The ARN of the Amazon S3 bucket, path prefix, and object key that contains the | ||
| * PEM-encoded certificate for the build project |
There was a problem hiding this comment.
Optional: you could add an example s3 arn.
Example: arn:aws:s3:::bucket_name/key/path/to/ca.pem
rot26
left a comment
There was a problem hiding this comment.
This is something we need at my job. 👍
2a72d0e to
64f3735
Compare
| * | ||
| * @default - No external certificate is added to the project | ||
| */ | ||
| readonly certificate?: string; |
There was a problem hiding this comment.
I'm wondering whether a string is the best way to model this...? Seems a little looks for my taste.
I see 2 possible alternatives:
- Introduce a dedicated interface for this property, something like
BuildCertificate, that takes in ans3.IBucket, a string for thekey, and maybe an optionalversion? - Use the existing
Locationinterface from the S3 module. There's a small downside that it takes in abucketNameas just a string, but maybe that's fine - we can show an example in the ReadMe of importing a Bucket by ARN, and then using it to pass thebucketNameproperty asbucket.bucketName.
I'll let you decide which option you like more!
There was a problem hiding this comment.
Ah thanks! I was looking for something better but couldn't find existing classes that met the need and wasn't sure about adding another interface. I like option 2 better since it already exists.
However, arns do not support versions and the BuildEnvironment certificate at the cloudformation level only accepts a string value that is an arn. It seems like there's no way to support a version at the moment for the certificate. Because of this I'll create a new interface that takes in an IBucket and key only so people don't think they can use a version when it's not supported.
Let me know if I'm wrong about the version? If so I'll use the existing interface. Won't be hard to do either way.
There was a problem hiding this comment.
Yeah, let's go with a new interface here.
64f3735 to
5abe2bd
Compare
d7a1d2c to
76a5717
Compare
|
@skinny85 Any additional feedback? I've added a new interface and documentation. |
|
I haven't reviewed the latest iteration. Make sure to re-request my review after you're done pushing your changes (there's a button next to my avatar in the top-right corner of the PR page). |
| props: ProjectProps, | ||
| projectVars: { [name: string]: BuildEnvironmentVariable } = {}): CfnProject.EnvironmentProperty { | ||
|
|
||
| let certificate: string | undefined = undefined; |
There was a problem hiding this comment.
Can we inline this variable? I don't think it adds much.
Add certificate as optional parameter to codebuild project Environment. The certificate option supports including an additional PEM certificate for on-prem DNS / SSL of codebuild projects.
76a5717 to
fc7fb32
Compare
|
I should probably stop force pushing so you can see the changes are resolved :). If there's anymore feedback I'll do that and squash later. I just realized I'm clobbering the diff on your requested changes. |
|
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 |
|
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). |
…te (aws#15738) fixes aws#15701 Add certificate as optional parameter to codebuild project Environment. The certificate option supports including an additional PEM certificate for on-prem DNS / SSL of codebuild projects. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…te (aws#15738) fixes aws#15701 Add certificate as optional parameter to codebuild project Environment. The certificate option supports including an additional PEM certificate for on-prem DNS / SSL of codebuild projects. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
fixes #15701
Add certificate as optional parameter to codebuild project
Environment. The certificate option supports including an additional
PEM certificate for on-prem DNS / SSL of codebuild projects.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license