-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path11.route-53.tf
43 lines (40 loc) · 1.17 KB
/
11.route-53.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
module "asterisk_acm" {
source = "./modules/acm"
project = local.vars.project
env = local.environment
domain_name = "*.${local.vars.route53.domain}"
}
module "route53_main" {
source = "./modules/route-53"
project = local.vars.project
env = local.environment
domain_name = local.vars.route53.domain
acm_domain_validation_options = setunion(
module.asterisk_acm.domain_validation_options,
module.cloudfront_web_app_acm.domain_validation_options
)
}
module "route53_record_web" {
source = "./modules/route-53-record"
hosted_zone_id = module.route53_main.hosted_zone_id
domain_name = local.vars.route53.domain
type = "A"
alias = [
{
name = module.cloudfront_web_app.domain_name
zone_id = module.cloudfront_web_app.hosted_zone_id
}
]
}
module "route53_record_api" {
source = "./modules/route-53-record"
hosted_zone_id = module.route53_main.hosted_zone_id
domain_name = "api.${local.vars.route53.domain}"
type = "A"
alias = [
{
name = module.network_load_balancer.dns_name
zone_id = module.network_load_balancer.zone_id
}
]
}