Cloudformation SSL Certificate failed with error "Value null at 'domainValidationOptions.1.member.validationDomain' failed to satisfy constraint"
My cloudformation template keeps throwing the following error: Value null at 'domainValidationOptions.1.member.validationDomain' failed to satisfy constraint. What am I missing here? I am using a wildcard as the parameter (ex. *.domainname.ai).
SSLCertificate:
Type: AWS::CertificateManager::Certificate
Properties:
CertificateTransparencyLoggingPreference: DISABLED
DomainName:
Ref: WildcardCertDomain
DomainValidationOptions:
- DomainName: !Ref WildcardCertDomain
ValidationMethod: DNS
I found the solution, you need to specify ValidationDomain: "example.com"
and it must be the superdomain.
The final product should look like this:
SSLCertificate:
Type: AWS::CertificateManager::Certificate
Properties:
CertificateTransparencyLoggingPreference: DISABLED
DomainName:
Ref: *.example.com
DomainValidationOptions:
- DomainName: *.example.com
ValidationDomain: "example.com"
ValidationMethod: DNS