-
Notifications
You must be signed in to change notification settings - Fork 2
/
variables.tf
232 lines (186 loc) · 4.67 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
variable "alt_hostname" {
description = "Specify an alternative hostname for the public website url (instead of public_zone_name)"
type = map(object({
zone_id = string
hostname = string
}))
default = {}
#
# To use alt_hostname, you first need to delegate it as a DNS zone to Route53.
# AWS will then create appropriate DNS records.
#
# alt_hostname = {
# "my-zone" = {
# zone_id = "Z0123456789ABCDEFGHI"
# hostname = "my-alt.added.domain.edu"
# }
# }
}
variable "app_name" {
default = "avalon"
}
variable "azs" {
type = list(string)
default = ["us-east-1a", "us-east-1b", "us-east-1c"]
}
variable "aws_profile" {
default = "default"
}
variable "aws_region" {
default = "us-east-1"
}
variable "availability_zone" {
default = "us-east-1a"
}
variable "avalon_admin" {
default = ""
}
variable "avalon_repo" {
description = "The repository to pull when building the Avalon image"
default = "https://github.com/avalonmediasystem/avalon"
}
variable "avalon_branch" {
description = "The branch to use when building the Avalon image"
default = "demo"
}
variable "avalon_commit" {
description = "The full commit hash to use when building the Avalon image (empty defaults to most recent for the avalon_branch)"
default = ""
}
variable "bib_retriever_protocol" {
default = "sru"
}
variable "bib_retriever_url" {
default = "http://zgate.example.edu:9000/exampledb"
}
variable "bib_retriever_query" {
default = "rec.id='%s'"
}
variable "bib_retriever_host" {
default = ""
}
variable "bib_retriever_port" {
default = ""
}
variable "bib_retriever_database" {
default = ""
}
variable "bib_retriever_attribute" {
default = ""
}
variable "bib_retriever_class" {
default = "Avalon::BibRetriever::SRU"
}
variable "bib_retriever_class_require" {
default = "avalon/bib_retriever/sru"
}
variable "bastion_instance_type" {
default = "t2.micro"
}
variable "compose_instance_type" {
default = "t3.large"
}
variable "compose_volume_size" {
type = number
default = 75
description = "The root volume size, in gigabytes, of the ec2 that runs the avalon docker containers"
}
variable "db_avalon_username" {
default = "dbavalon"
}
variable "db_fcrepo_username" {
default = "dbfcrepo"
}
variable "ec2_keyname" {
type = string
default = ""
description = "The name of an AWS EC2 key pair to use for authenticating"
}
variable "ec2_public_key" {
type = string
default = ""
description = "A SSH public key string to use for authenticating"
}
variable "email_comments" {
type = string
}
variable "email_notification" {
type = string
}
variable "email_support" {
type = string
}
variable "environment" {
type = string
}
variable "fcrepo_binary_bucket_username" {
type = string
default = ""
description = "AWS IAM user for fedora bucket (will attempt to create if left blank)"
}
variable "fcrepo_binary_bucket_access_key" {
type = string
default = ""
description = "AWS IAM user access key for fedora bucket (will attempt to create if username blank)"
}
variable "fcrepo_binary_bucket_secret_key" {
type = string
default = ""
description = "AWS IAM user secret key for fedora bucket (will attempt to create if username blank)"
}
variable "fcrepo_db_ssl" {
type = bool
default = false
description = "Forces SSL on the fedora database connection"
}
variable "hosted_zone_name" {
type = string
}
variable "postgres_version" {
default = "14.10"
}
#variable "sms_notification" {
# type = string
#}
variable "ssh_cidr_blocks" {
description = "Allow inbound SSH connections from given CIDR ranges"
type = list(string)
default = []
}
variable "stack_name" {
default = "stack"
}
variable "tags" {
type = map(string)
default = {}
}
variable "vpc_cidr_block" {
default = "10.1.0.0/16"
}
variable "vpc_public_subnets" {
type = list(string)
default = ["10.1.2.0/24", "10.1.4.0/24", "10.1.6.0/24"]
}
variable "vpc_private_subnets" {
type = list(string)
default = ["10.1.1.0/24", "10.1.3.0/24", "10.1.5.0/24"]
}
variable "zone_prefix" {
description = "An optional prefix string to the hosted zone names"
type = string
default = ""
}
locals {
namespace = "${var.stack_name}-${var.environment}"
public_zone_name = "${var.zone_prefix}${var.environment}.${var.hosted_zone_name}"
private_zone_name = "vpc.${var.zone_prefix}${var.environment}.${var.hosted_zone_name}"
ec2_hostname = "ec2.${local.public_zone_name}"
common_tags = merge(
var.tags,
{
"Terraform" = "true"
"Environment" = local.namespace
"Project" = "Infrastructure"
},
)
}