-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathvariables.tf
296 lines (287 loc) · 8.53 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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
## Database settings
variable "deploy_rds_db" {
description = "Enabled deploy rds"
type = bool
default = false
}
variable "deploy_ec2_instance_db" {
description = "Create ec2 instance with postgresql db in docker"
type = bool
default = true
}
variable "rds_instance_type" {
description = "AWS RDS instance type"
type = string
default = "db.t3.large"
}
variable "rds_allocated_storage" {
description = "Size of rds storage"
type = number
default = 20
}
variable "rds_max_allocated_storage" {
description = "Max size of rds storage"
type = number
default = 300
}
variable "rds_multi_az" {
description = "Creates a primary DB instance and a standby DB instance in a different AZ. Provides high availability and data redundancy, but the standby DB instance doesn't support connections for read workloads."
type = bool
default = false
}
## Service settings
variable "path_docker_compose_files" {
description = "Path in ec2 instance for blockscout files"
type = string
default = "/opt/blockscout"
}
variable "user" {
description = "What user to service run as"
type = string
default = "root"
}
variable "image_name" {
description = "OS image mask"
type = string
default = "ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-202304*"
}
variable "image_owner" {
description = "ID of image owner"
type = string
default = "679593333241"
}
variable "ssh_keys" {
description = "Create ssh keys"
type = map(string)
default = {}
}
variable "tags" {
description = "Add custom tags for all resources managed by this script"
type = map(string)
default = {}
}
variable "ssl_certificate_arn" {
description = "Certificate for ALB"
type = string
default = ""
}
variable "iam_instance_profile_arn" {
description = "Amazon Resource Name (ARN) of an existing IAM instance profile. Used when `create_iam_instance_profile_ssm_policy` = `false`"
type = string
default = null
}
variable "create_iam_instance_profile_ssm_policy" {
description = "Determines whether an IAM instance profile with SSM policy is created or to use an existing IAM instance profile"
type = string
default = false
}
## Network
variable "vpc_name" {
description = "VPC name"
type = string
default = ""
}
variable "vpc_cidr" {
description = "VPC cidr"
type = string
default = "10.105.0.0/16"
}
variable "vpc_private_subnet_cidrs" {
description = "Not required! You can set custom private subnets"
type = list(string)
default = null
}
variable "vpc_public_subnet_cidrs" {
description = "Not required! You can set custom public subnets"
type = list(string)
default = null
}
variable "enabled_nat_gateway" {
description = "Nat gateway enabled"
type = bool
default = true
}
variable "enabled_dns_hostnames" {
description = "Autocreate dns names for ec2 instance in route53. Required for work with default DB"
type = bool
default = true
}
variable "existed_vpc_id" {
description = "Required for using existed vpc. ID of VPC"
type = string
default = ""
}
variable "existed_private_subnets_ids" {
description = "List of existed id private subnets(For instances)"
type = list(string)
default = []
}
variable "existed_public_subnets_ids" {
description = "List of existed if public subnets(For LB)"
type = list(string)
default = []
}
variable "existed_rds_subnet_group_name" {
description = "Name of subnet group for RDS deploy"
type = string
default = ""
}
variable "single_nat_gateway" {
description = "Should be true if you want to provision a single shared NAT Gateway across all of your private networks"
type = bool
default = true
}
## Blockscout settings
variable "blockscout_settings" {
description = "Settings of blockscout app"
type = object({
postgres_password = optional(string, "postgres")
postgres_user = optional(string, "postgres")
postgres_host = optional(string, "postgres")
blockscout_docker_image = optional(string, "blockscout/blockscout-polygon-supernets:5.1.3-prerelease-61c1238e")
rpc_address = optional(string, "https://rpc-supertestnet.polygon.technology")
chain_id = optional(string, "93201")
rust_verification_service_url = optional(string, "https://sc-verifier.aws-k8s.blockscout.com/")
ws_address = optional(string, "")
visualize_sol2uml_service_url = optional(string, "")
sig_provider_service_url = optional(string, "")
})
default = {}
}
variable "ui_and_api_instance_type" {
description = "AWS instance type"
type = string
default = "t2.medium"
}
variable "indexer_instance_type" {
description = "AWS instance type"
type = string
default = "t2.medium"
}
## Verifier settings
variable "verifier_enabled" {
description = "Verifier deploy"
type = bool
default = true
}
variable "verifier_instance_type" {
description = "AWS instance type"
type = string
default = "t2.medium"
}
variable "verifier_replicas" {
description = "Number of verifier replicas"
type = number
default = 2
}
variable "verifier_settings" {
description = "Settings of verifier"
type = object({
docker_image = optional(string, "ghcr.io/blockscout/smart-contract-verifier:main")
solidity_fetcher_list_url = optional(string, "https://solc-bin.ethereum.org/linux-amd64/list.json")
solidity_refresh_versions_schedule = optional(string, "0 0 * * * * *")
vyper_fetcher_list_url = optional(string, "https://raw.githubusercontent.com/blockscout/solc-bin/main/vyper.list.json")
vyper_refresh_versions_schedule = optional(string, "0 0 * * * * *")
sourcify_api_url = optional(string, "https://sourcify.dev/server/")
})
default = {}
}
## Sig-provider settings
variable "sig_provider_enabled" {
description = "sig-provider deploy"
type = bool
default = false
}
variable "sig_provider_instance_type" {
description = "AWS instance type"
type = string
default = "t2.medium"
}
variable "sig_provider_docker_image" {
description = "Docker image of sig-provider"
type = string
default = "ghcr.io/blockscout/sig-provider:main"
}
variable "sig_provider_replicas" {
description = "Number of sig-provider replicas"
type = number
default = 1
}
## Visualizer settings
variable "visualizer_enabled" {
description = "Visualizer deploy"
type = bool
default = true
}
variable "visualizer_instance_type" {
description = "AWS instance type"
type = string
default = "t2.medium"
}
variable "visualizer_replicas" {
description = "Number of visualizer replicas"
type = number
default = 2
}
variable "visualizer_docker_image" {
description = "Docker image of visualizer"
type = string
default = "ghcr.io/blockscout/visualizer:latest"
}
## Stats settings
variable "stats_enabled" {
description = "stats deploy"
type = bool
default = true
}
variable "stats_instance_type" {
description = "AWS instance type"
type = string
default = "t2.medium"
}
variable "stats_replicas" {
description = "Number of stats replicas"
type = number
default = 1
}
variable "stats_docker_image" {
description = "Docker image of stats"
type = string
default = "ghcr.io/blockscout/stats:main"
}
variable "stats_create_database" {
description = "Create database in application start"
type = bool
default = true
}
## eth-bytecode-db settings
variable "eth_bytecode_db_enabled" {
description = "eth-bytecode-db deploy"
type = bool
default = true
}
variable "eth_bytecode_db_instance_type" {
description = "AWS instance type"
type = string
default = "t2.medium"
}
variable "eth_bytecode_db_replicas" {
description = "Number of eth-bytecode-db replicas"
type = number
default = 1
}
variable "eth_bytecode_db_docker_image" {
description = "Docker image of eth-bytecode-db"
type = string
default = "ghcr.io/blockscout/eth-bytecode-db:main"
}
variable "verifier_url" {
description = "Url of verifier"
type = string
default = ""
}
variable "eth_bytecode_db_create_database" {
description = "Create database in application start"
type = bool
default = true
}