forked from magenx/Magento-2-aws-cluster-terraform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathacm.tf
28 lines (21 loc) · 1.12 KB
/
acm.tf
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
///////////////////////////////////////////////////[ AWS CERTIFICATE MANAGER ]////////////////////////////////////////////
# # ---------------------------------------------------------------------------------------------------------------------#
# Create ssl certificate for domain and subdomains
# # ---------------------------------------------------------------------------------------------------------------------#
resource "aws_acm_certificate" "default" {
domain_name = "${var.app["domain"]}"
subject_alternative_names = ["*.${var.app["domain"]}"]
validation_method = "EMAIL"
lifecycle {
create_before_destroy = true
}
tags = {
Name = "${local.project}-${var.app["domain"]}-cert"
}
}
# # ---------------------------------------------------------------------------------------------------------------------#
# Validate ssl certificate for domain and subdomains
# # ---------------------------------------------------------------------------------------------------------------------#
resource "aws_acm_certificate_validation" "default" {
certificate_arn = aws_acm_certificate.default.arn
}