forked from chgangaraju/terraform-aws-cloudfront-s3-website
-
Notifications
You must be signed in to change notification settings - Fork 1
/
variables.tf
92 lines (75 loc) · 2.31 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
91
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 "compress" {
type = bool
default = false
description = "CF is compress or not"
}
variable "s3_cors" {
type = bool
default = false
description = "S3 is enable cors"
}
variable "cache_policy_id" {
type = string
default = ""
description = "cache policy id for CF"
}
variable "origin_request_policy_id" {
type = string
default = ""
description = "origin_request_policy_id for CF"
}
variable "forwarding" {
type = bool
default = true
description = "forwaring or not"
}
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))
}
}