cdk-constructs icon indicating copy to clipboard operation
cdk-constructs copied to clipboard

Avoid redundant domain name entry

Open pmeinhardt opened this issue 1 year ago • 0 comments

Previously, the first domain name was passed to the DnsValidatedCertificate construct twice.

In the domainName prop and again in the subjectAlternativeNames.

For example, when using new StaticWebsite(app, "Website", { domainNames: ["example.org"], … }), the wildcard domain *.example.org was specified twice.

For reference, see the corresponding code in DnsValidatedCertificate.

There is one thing I was not able to verify yet. The value of subjectAlternativeNames is used in one more place in the DnsValidatedCertificate construct: https://github.com/aws/aws-cdk/blob/v2.153.0/packages/aws-cdk-lib/aws-certificatemanager/lib/dns-validated-certificate.ts#L147

The custom resource also receives domainName separately, but I couldn't tell whether removing it from the subjectAlternativeNames might have any side effects here.

Kind regards, Paul

pmeinhardt avatar Sep 02 '24 11:09 pmeinhardt