Skip to content

Commit f9a850c

Browse files
committed
feat: configure production domain and certificate
1 parent 096999e commit f9a850c

File tree

2 files changed

+39
-7
lines changed

2 files changed

+39
-7
lines changed

infra/Pulumi.dev.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ config:
66
projectm-infra:githubOwner: projectM-visualizer
77
projectm-infra:githubRefs: '["ref:refs/heads/*","ref:refs/tags/*","ref:refs/pull/*"]'
88
projectm-infra:githubRepo: projectm-visualizer.org
9+
projectm-infra:primaryDomain: projectm-visualizer.org
10+
projectm-infra:hostedZoneId: Z0970442162ZXM1J1N8GK

infra/index.ts

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,36 @@ if (certificateArnFromConfig) {
4848
{
4949
domainName: primaryDomain,
5050
validationMethod: 'DNS',
51-
subjectAlternativeNames: alternateDomains
51+
subjectAlternativeNames: alternateDomains,
52+
validationOptions: [
53+
{
54+
domainName: primaryDomain,
55+
validationDomain: primaryDomain
56+
},
57+
...alternateDomains.map(domain => ({
58+
domainName: domain,
59+
validationDomain: domain
60+
}))
61+
]
5262
},
53-
{ provider: eastRegion }
63+
{
64+
provider: eastRegion,
65+
customTimeouts: {
66+
create: '20m',
67+
delete: '5m'
68+
}
69+
}
5470
)
5571

56-
const validationRecords = certificate.domainValidationOptions.apply(
57-
options =>
58-
options.map(
72+
const validationRecords = certificate.domainValidationOptions.apply(options =>
73+
options
74+
.filter(
75+
option =>
76+
option.resourceRecordName
77+
&& option.resourceRecordType
78+
&& option.resourceRecordValue
79+
)
80+
.map(
5981
(option, index) =>
6082
new aws.route53.Record(
6183
`siteCertValidation-${index}`,
@@ -64,7 +86,8 @@ if (certificateArnFromConfig) {
6486
name: option.resourceRecordName,
6587
type: option.resourceRecordType,
6688
records: [option.resourceRecordValue],
67-
ttl: 60
89+
ttl: 60,
90+
allowOverwrite: true
6891
},
6992
{ dependsOn: certificate }
7093
)
@@ -79,7 +102,14 @@ if (certificateArnFromConfig) {
79102
records.map(record => record.fqdn)
80103
)
81104
},
82-
{ provider: eastRegion }
105+
{
106+
provider: eastRegion,
107+
customTimeouts: {
108+
create: '20m',
109+
update: '20m',
110+
delete: '5m'
111+
}
112+
}
83113
)
84114

85115
certificateArn = certificateValidation.certificateArn

0 commit comments

Comments
 (0)