bsmsapp/terraform/organization/cloudfront.tf

27 lines
536 B
HCL

module "cloudfront" {
for_each = local.cloudfront
source = "../modules/cloudfront"
providers = {
aws = aws.aws
}
depends_on = [
module.s3,
module.apigw,
module.acm
]
enabled = true
web_acl_id = try(each.value.web_acl_id, null)
aliases = each.value.aliases
acm_certificate_arn = module.acm.certificate_arn
default_root_object = "index.html"
origin = each.value.origin
default_cache_behavior = each.value.default_cache_behavior
code = try(each.value.code, "")
}