forked from chgangaraju/terraform-aws-cloudfront-s3-website
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.tf
90 lines (74 loc) · 2.56 KB
/
variables.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
variable "domain_name" {
description = "domain name (or application name if no domain name available)"
}
variable "tags" {
type = map(string)
default = {}
description = "tags for all the resources, if any"
}
variable "hosted_zone" {
default = null
description = "Route53 hosted zone"
}
variable "acm_certificate_domain" {
default = null
description = "Domain of the ACM certificate"
}
variable "price_class" {
default = "PriceClass_100" // Only US,Canada,Europe
description = "CloudFront distribution price class"
}
variable "use_default_domain" {
default = false
description = "Use CloudFront website address without Route53 and ACM certificate"
}
variable "upload_sample_file" {
default = false
description = "Upload sample html file to s3 bucket"
}
# All values for the TTL are important when uploading static content that changes
# https://stackoverflow.com/questions/67845341/cloudfront-s3-etag-possible-for-cloudfront-to-send-updated-s3-object-before-t
variable "cloudfront_min_ttl" {
default = 0
description = "The minimum TTL for the cloudfront cache"
}
variable "cloudfront_default_ttl" {
default = 86400
description = "The default TTL for the cloudfront cache"
}
variable "cloudfront_max_ttl" {
default = 31536000
description = "The maximum TTL for the cloudfront cache"
}
variable "cloudfront_geo_restriction_restriction_type" {
default = "none"
description = "The method that you want to use to restrict distribution of your content by country: none, whitelist, or blacklist."
validation {
error_message = "Can only specify either none, whitelist, blacklist"
condition = can(regex("^(none|whitelist|blacklist)$", var.cloudfront_geo_restriction_restriction_type))
}
}
variable "cloudfront_geo_restriction_locations" {
default = []
description = "The ISO 3166-1-alpha-2 codes for which you want CloudFront either to distribute your content (whitelist) or not distribute your content (blacklist)."
}
variable "logging_bucket" {
type = string
description = "An existing bucket to log requests to, null if no logging"
default = ""
}
variable "logging_prefix" {
type = string
description = "A prefix for the logging_bucket, null if not used"
default = ""
}
variable "configure_website" {
type = bool
description = "Set false to not add a bucket website configuration"
default = true
}
variable "distribution_response_page_path" {
type = string
description = "Error response page path, default to '/'"
default = "/"
}