generated from ethpandaops/template-devnets
-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.tf
74 lines (68 loc) · 2.03 KB
/
main.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
////////////////////////////////////////////////////////////////////////////////////////
// TERRAFORM PROVIDERS & BACKEND
////////////////////////////////////////////////////////////////////////////////////////
terraform {
required_providers {
digitalocean = {
source = "digitalocean/digitalocean"
version = "~> 2.28"
}
cloudflare = {
source = "cloudflare/cloudflare"
version = "~> 3.0"
}
hcloud = {
source = "hetznercloud/hcloud"
version = "~> 1.42.1"
}
}
}
terraform {
backend "s3" {
skip_credentials_validation = true
skip_metadata_api_check = true
endpoints = { s3 = "https://fra1.digitaloceanspaces.com" }
skip_requesting_account_id = true
skip_s3_checksum = true
region = "us-east-1"
bucket = "peerdas-devnets"
key = "infrastructure/devnet-0/terraform.tfstate"
}
}
provider "digitalocean" {
http_retry_max = 20
}
provider "cloudflare" {
api_token = var.cloudflare_api_token
}
////////////////////////////////////////////////////////////////////////////////////////
// VARIABLES
////////////////////////////////////////////////////////////////////////////////////////
variable "cloudflare_api_token" {
type = string
sensitive = true
description = "Cloudflare API Token"
}
variable "ethereum_network" {
type = string
default = "peerdas-devnet-0"
}
variable "base_cidr_block" {
default = "10.76.0.0/16"
}
////////////////////////////////////////////////////////////////////////////////////////
// LOCALS
////////////////////////////////////////////////////////////////////////////////////////
locals {
vm_groups = [
var.bootnode,
var.lighthouse_geth,
var.lighthouse_nethermind,
var.prysm_geth,
var.prysm_nethermind,
var.teku_geth,
var.teku_nethermind,
var.nimbus_geth,
var.grandine_geth,
]
}