Skip to content

Commit 6976e48

Browse files
authored
Add apex domain validation (#54)
1 parent 77d1971 commit 6976e48

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

templates/acm-certificate.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ Parameters:
1212
Type: String
1313

1414
Conditions:
15-
CreateApexConfig: !Equals
15+
CreateApexConfig: !Equals
1616
- !Ref CreateApex
1717
- 'yes'
1818

1919
Resources:
2020
Certificate:
2121
Type: AWS::CertificateManager::Certificate
22-
Properties:
22+
Properties:
2323
DomainName: !Sub '${SubDomain}.${DomainName}'
2424
SubjectAlternativeNames:
2525
Fn::If:
@@ -29,9 +29,14 @@ Resources:
2929
DomainValidationOptions:
3030
- DomainName: !Sub '${SubDomain}.${DomainName}'
3131
HostedZoneId: !Ref HostedZoneId
32+
- Fn::If:
33+
- CreateApexConfig
34+
- - DomainName: !Ref DomainName
35+
HostedZoneId: !Ref HostedZoneId
36+
- Ref: AWS::NoValue
3237
ValidationMethod: DNS
3338

3439
Outputs:
35-
CertificateArn:
40+
CertificateArn:
3641
Description: Issued certificate
3742
Value: !Ref Certificate

0 commit comments

Comments
 (0)