This repository has been archived by the owner on Sep 22, 2024. It is now read-only.
forked from gruntwork-io/terraform-google-static-assets
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.tf
149 lines (125 loc) · 5.86 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
# ---------------------------------------------------------------------------------------------------------------------
# REQUIRED PARAMETERS
# These variables are expected to be passed in by the operator
# ---------------------------------------------------------------------------------------------------------------------
variable "project" {
description = "The project ID to host the site in."
type = string
}
variable "website_domain_name" {
description = "The name of the website and the Cloud Storage bucket to create (e.g. static.foo.com)."
type = string
}
# ---------------------------------------------------------------------------------------------------------------------
# OPTIONAL MODULE PARAMETERS
# These variables have defaults, but may be overridden by the operator.
# ---------------------------------------------------------------------------------------------------------------------
variable bucket_name{
description = "name of bucket(if provided) otherwise dashed website domain name is used"
default = ""
}
variable "website_location" {
description = "Location of the bucket that will store the static website. Once a bucket has been created, its location can't be changed. See https://cloud.google.com/storage/docs/bucket-locations"
type = string
default = "US"
}
variable "website_storage_class" {
description = "Storage class of the bucket that will store the static website"
type = string
default = "MULTI_REGIONAL"
}
variable "website_acls" {
description = "Bucket default object ACLs to allow users access to objects, for example 'READER:allUsers'. See https://cloud.google.com/storage/docs/access-control/lists"
type = list(string)
default = ["READER:allUsers"]
}
variable "enable_versioning" {
description = "Set to true to enable versioning. This means the website bucket will retain all old versions of all files. This is useful for backup purposes (e.g. you can rollback to an older version), but it may mean your bucket uses more storage."
type = bool
default = true
}
variable "index_page" {
description = "Bucket's directory index"
type = string
default = "index.html"
}
variable "not_found_page" {
description = "The custom object to return when a requested resource is not found"
type = string
default = "404.html"
}
variable "enable_cors" {
description = "Set to true if you want to enable CORS headers"
type = bool
default = false
}
variable "cors_origins" {
description = "List of Origins eligible to receive CORS response headers. Note: '*' is permitted in the list of origins, and means 'any Origin'"
type = list(string)
default = []
}
variable "cors_methods" {
description = "list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc). Note: '*' is permitted in the list of methods, and means 'any method'"
type = list(string)
default = []
}
variable "cors_extra_headers" {
description = "List of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains"
type = list(string)
default = []
}
variable "cors_max_age_seconds" {
description = "The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses"
type = number
default = 600
}
variable "force_destroy_website" {
description = "If set to true, this will force the delete of the website bucket when you run terraform destroy, even if there is still content in it. This is only meant for testing and should not be used in production."
type = bool
default = false
}
variable "force_destroy_access_logs_bucket" {
description = "If set to true, this will force the delete of the access logs bucket when you run terraform destroy, even if there is still content in it. This is only meant for testing and should not be used in production."
type = bool
default = false
}
variable "access_logs_expiration_time_in_days" {
description = "How many days to keep access logs around for before deleting them."
type = number
default = 30
}
variable "access_log_prefix" {
description = "The object prefix for log objects. If it's not provided, it is set to the value of var.website_domain_name with dots are replaced with dashes, e.g. 'site-acme-com'."
type = string
default = ""
}
variable "website_kms_key_name" {
description = "A Cloud KMS key that will be used to encrypt objects inserted into the website bucket. If empty, the contents will not be encrypted. You must pay attention to whether the crypto key is available in the location that this bucket is created in."
type = string
default = ""
}
variable "access_logs_kms_key_name" {
description = "A Cloud KMS key that will be used to encrypt objects inserted into the access logs bucket. If empty, the contents will not be encrypted. You must pay attention to whether the crypto key is available in the location that this bucket is created in."
type = string
default = ""
}
variable "create_dns_entry" {
description = "If set to true, create a DNS CNAME Record in Cloud DNS with the domain name in var.website_domain_name."
type = bool
default = false
}
variable "dns_managed_zone_name" {
description = "The name of the Cloud DNS Managed Zone in which to create the DNS CNAME Record specified in var.website_domain_name. Only used if var.create_dns_entry is true."
type = string
default = "replace-me"
}
variable "dns_record_ttl" {
description = "The time-to-live for the site CNAME record set (seconds)"
type = number
default = 300
}
variable "custom_labels" {
description = "A map of custom labels to apply to the resources. The key is the label name and the value is the label value."
type = map(string)
default = {}
}