-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
166 lines (139 loc) · 4.45 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
variable "namespace" {
type = string
default = null
description = "Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp'"
}
variable "environment" {
type = string
default = null
description = "Environment, e.g. 'uw2', 'us-west-2', OR 'prod', 'staging', 'dev', 'UAT'"
}
variable "stage" {
type = string
default = null
description = "Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release'"
}
variable "name" {
type = string
description = "Solution name, e.g. 'app' or 'storage'"
}
variable "attributes" {
type = list(string)
default = []
description = "Additional attributes (e.g. `1`)"
}
variable "tags" {
type = map(string)
default = {}
description = "Additional tags (e.g. `map('BusinessUnit','XYZ')`"
}
variable "dns_zone_name" {
type = string
default = ""
description = "Name of HostedZone to create Cloudfront Records in"
}
variable "cloudfront_aliases" {
type = map(string)
default = {}
description = "Domain Aliases for the Cloudfront Distribution in form of Record Name => Zone Name"
}
variable "cloudfront_trusted_signers" {
type = list(string)
default = []
description = "Trusted AWS Account IDs or Keyword 'self' to allow signing URLs for this Distribution"
}
variable "cloudfront_comment" {
type = string
default = ""
description = "Description for the Cloudfront Distribution"
}
variable "cloudfront_default_root" {
type = string
default = ""
description = "Default Key for Cloudfront Root Domain"
}
variable "cloudfront_domain" {
type = string
default = ""
description = "Domain for Cloudfront to use"
}
variable "cloudfront_price_class" {
type = string
default = "PriceClass_100"
description = "Price Class for the Cloudfront Distribution"
}
variable "cloudfront_min_ttl" {
type = number
default = 1800
description = "Minimum Time to Life for Files in Cloudfront"
}
variable "cloudfront_max_ttl" {
type = number
default = 432000
description = "Maximum Time to Life for Files in Cloudfront"
}
variable "cloudfront_default_ttl" {
type = number
default = 7200
description = "Default Time to Life for Files in Cloudfront"
}
variable "cloudfront_viewer_protocol_policy" {
type = string
default = "redirect-to-https"
description = "Viewer Protocol Policy for Cloudfront. If you plan to use Cloudfront with Signed URLs consider https-only"
}
variable "cloudfront_404_rewrite" {
type = string
default = ""
description = "Adds a Redirect Rule to Cloudfront on 404 which internally rewrites the Request to the specified Key"
}
variable "cloudfront_404_rewrite_code" {
type = number
default = "200"
description = "HTTP Code to return instead of 404. Only applies when cloudfront_404_redirect specifies a Key"
}
variable "cloudfront_public_keys" {
type = list(string)
default = []
description = "Public Keys in PEM Format to upload to Cloudfront (for example for URL Signing)"
}
variable "cloudfront_cached_methods" {
type = list(string)
default = ["GET", "HEAD"]
description = "Methods CloudFront considers eligible for Caching"
}
variable "cloudfront_allowed_methods" {
type = list(string)
default = ["GET", "HEAD"]
description = "Methods CloudFront allows. For CORS Support set enable_cors to true. OPTIONS will be automatically added"
}
variable "cloudfront_compress" {
type = bool
default = true
description = "Enables or Disables Cloudfront Compression"
}
variable "lifecycle_expiration_rules" {
type = map(object({ prefix = string, expirationInDays = number }))
default = {}
description = "Expiration Lifecycle Rules for the S3 Bucket."
}
variable "enable_cors" {
type = bool
default = false
description = "Enables CORS."
}
variable "cors_allowed_headers" {
type = list(string)
default = ["referer", "origin", "user-agent"]
description = "Allowed Headers for CORS Requests"
}
variable "cors_allowed_methods" {
type = list(string)
default = ["GET"]
description = "Allowed Methods for CORS Requests"
}
variable "cors_allowed_origins" {
type = list(string)
default = ["*"]
description = "Allowed Origins for CORS. Its recommended to change the default value to only allow specific Origins."
}