-
-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathssl.tf
More file actions
31 lines (23 loc) · 663 Bytes
/
ssl.tf
File metadata and controls
31 lines (23 loc) · 663 Bytes
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
resource "aws_route53_record" "record_dns" {
count = var.enable_ssl ? 1 : 0
zone_id = var.dns_zone_id
name = var.https_record_name
type = "A"
alias {
name = module.ecs_fargate.aws_lb_lb_dns_name
zone_id = module.ecs_fargate.aws_lb_lb_zone_id
evaluate_target_health = true
}
}
module "acm" {
count = var.enable_ssl ? 1 : 0
source = "terraform-aws-modules/acm/aws"
version = "~> 6.0"
domain_name = var.https_record_domain_name
zone_id = var.dns_zone_id
subject_alternative_names = [
"*.${var.https_record_domain_name}",
]
wait_for_validation = true
tags = var.tags
}