mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-09 11:18:35 +00:00
50 lines
1.2 KiB
HCL
50 lines
1.2 KiB
HCL
resource "aws_cloudfront_distribution" "website_distribution" {
|
|
origin {
|
|
custom_origin_config {
|
|
http_port = "80"
|
|
https_port = "443"
|
|
origin_protocol_policy = "http-only"
|
|
origin_ssl_protocols = ["TLSv1", "TLSv1.1", "TLSv1.2"]
|
|
}
|
|
|
|
domain_name = "${var.domain_name}"
|
|
origin_id = "${var.origin_id}"
|
|
}
|
|
|
|
enabled = true
|
|
default_root_object = "index.html"
|
|
|
|
default_cache_behavior {
|
|
// All values are defaults from the AWS console.
|
|
viewer_protocol_policy = "redirect-to-https"
|
|
compress = true
|
|
allowed_methods = ["GET", "HEAD"]
|
|
cached_methods = ["GET", "HEAD"]
|
|
target_origin_id = "${var.origin_id}"
|
|
min_ttl = 0
|
|
default_ttl = 86400
|
|
max_ttl = 31536000
|
|
|
|
forwarded_values {
|
|
query_string = false
|
|
|
|
cookies {
|
|
forward = "none"
|
|
}
|
|
}
|
|
}
|
|
|
|
aliases = ["${var.cnames}"]
|
|
|
|
restrictions {
|
|
geo_restriction {
|
|
restriction_type = "none"
|
|
}
|
|
}
|
|
|
|
viewer_certificate {
|
|
acm_certificate_arn = "${var.acm_certificate_arn}"
|
|
ssl_support_method = "sni-only"
|
|
}
|
|
}
|