-
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(certificatemanager): allow tagging DnsValidatedCertificate #13990
Conversation
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.
Looks great, thanks!
I left a few minor comments. Additionally, could you add two more tests:
- A test for
handler.test.js
that shows success if tags are not provided. - A test for
dns-validated-certificate.test.ts
showing that tags are included as properties of the CustomResource if they are provided.
const map = new Map(Object.entries(tags)); | ||
const result = Array.from(map).map(([Key, Value]) => ({ Key, Value })) |
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.
I believe the new Map
here is redundant, unless there's a specific (edge) case I'm missing. The below should work:
const map = new Map(Object.entries(tags)); | |
const result = Array.from(map).map(([Key, Value]) => ({ Key, Value })) | |
const result = Array.from(Object.entries(tags)).map(([Key, Value]) => ({ Key, Value })) |
@@ -34,7 +34,7 @@ See https://docs.aws.amazon.com/acm/latest/userguide/acm-limits.html for more in | |||
|
|||
DNS validation is the preferred method to validate domain ownership, as it has a number of advantages over email validation. | |||
See also [Validate with DNS](https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html) | |||
in the AWS Certificate Manager User Guide. | |||
in the AWS Certificate Manager User Guide. All stack tags will be applied to the DNS validated Certificate. |
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.
I think this is a little out of place here, and doesn't really need to be here. Our "all features must have README updates" rule is sometimes a bit aggressive.
in the AWS Certificate Manager User Guide. All stack tags will be applied to the DNS validated Certificate. | |
in the AWS Certificate Manager User Guide. |
/** | ||
* Resource Tags. | ||
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-certificatemanager-certificate.html#cfn-certificatemanager-certificate-tags | ||
*/ |
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.
/** | |
* Resource Tags. | |
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-certificatemanager-certificate.html#cfn-certificatemanager-certificate-tags | |
*/ | |
/** | |
* Resource Tags. | |
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-certificatemanager-certificate.html#cfn-certificatemanager-certificate-tags | |
*/ |
|
||
|
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.
Really appreciate the review, @njlynch, I believe this latest commit addresses the tests as well as the syntax changes suggested. |
packages/@aws-cdk/aws-certificatemanager/test/dns-validated-certificate.test.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-certificatemanager/test/dns-validated-certificate.test.ts
Outdated
Show resolved
Hide resolved
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.
I made two other minor changes, and this is good to go!
Thanks for the contribution!
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). |
@Mergifyio refresh |
Command
|
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). |
…13990) Closes aws#12382 Attempting to implement the fix suggested in aws#12382 to allow the DnsValidatedCertificate resource to be taggable. Currently, only the custom lambda that is created is tagged, but the certificate provisioned by the lambda is not tagged. This would allow the lambda to pass tags through to the certificate, too. *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Closes #12382
Attempting to implement the fix suggested in #12382 to allow the DnsValidatedCertificate resource to be taggable. Currently, only the custom lambda that is created is tagged, but the certificate provisioned by the lambda is not tagged. This would allow the lambda to pass tags through to the certificate, too.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license