Skip to content

Commit

Permalink
Allow to define custom CAA records
Browse files Browse the repository at this point in the history
  • Loading branch information
rarous committed Oct 29, 2021
1 parent bf92409 commit 9279586
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions website.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,10 @@ export function getHostedZone(domain: string, provider?: aws.Provider) {
* You will need to have just one instance per all your stacks.
* @param domain {string} website domain name
* @param provider {aws.Provider}
* @param options {{caaRecords: string[]}}
* @returns {pulumi.Output<pulumi.Unwrap<aws.acm.GetCertificateResult>>}
*/
export function createCertificate(domain: string, provider?: aws.Provider) {
export function createCertificate(domain: string, provider?: aws.Provider, {caaRecords} = {caaRecords: []}) {
const parentDomain = getParentDomain(domain);
const usEast1 =
provider ??
Expand Down Expand Up @@ -422,7 +423,8 @@ export function createCertificate(domain: string, provider?: aws.Provider) {
`0 issuewild "amazontrust.com"`,
`0 issuewild "awstrust.com"`,
`0 issuewild "amazonaws.com"`,
`0 iodef "mailto:[email protected]"`
`0 iodef "mailto:[email protected]"`,
...caaRecords
],
ttl: 3600
});
Expand Down

0 comments on commit 9279586

Please sign in to comment.