-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwordpress-aws-ssl-certificate.yaml
31 lines (27 loc) · 1.25 KB
/
wordpress-aws-ssl-certificate.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
AWSTemplateFormatVersion: "2010-09-09"
Description: "Request SSL certificate for Wordpress"
Parameters:
ProjectName:
Description: Please specify a unique string to identify this Wordpress installation for various purposes (billing, technical, etc)
Type: String
MinLength: 8
ConstraintDescription: "Length of the unique ID should be at least 10 characters and it may contains only characters and numbers."
WordpressDomains:
Description: "Comma-delimited list of domain names (for example, domain.com,www.domain.com). Please ensure each entry is a valid domain name."
Type: List<String>
AllowedPattern: '^(?:[a-zA-Z0-9-]{1,63}\.?)+(?:[a-zA-Z]{2,})+$'
ConstraintDescription: "Each domain name must be a valid domain format, without protocol or paths."
Resources:
WordpressSSLCertificate:
Type: AWS::CertificateManager::Certificate
Properties:
DomainName: !Select [0, !Ref WordpressDomains] # Primary domain
SubjectAlternativeNames: !Ref WordpressDomains # Include all specified domains
ValidationMethod: DNS # or 'EMAIL'
Outputs:
SslCertificateArn:
Description: The ARN of the SSL certificate
Value: !Ref WordpressSSLCertificate
Export:
Name: !Sub "${AWS::StackName}-SslCertificateArn"