2019-01-16 10:22:44 -08:00
|
|
|
locals {
|
|
|
|
context_variables = {
|
|
|
|
"staging" = {
|
2019-03-07 12:29:43 -08:00
|
|
|
env = "staging"
|
|
|
|
create_mainnet = 1
|
|
|
|
create_testnet = 0
|
|
|
|
create_misc = 0
|
2019-01-16 10:22:44 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
"prod" = {
|
2019-03-07 12:29:43 -08:00
|
|
|
env = "prod"
|
|
|
|
create_mainnet = 1
|
|
|
|
create_testnet = 0
|
|
|
|
create_misc = 0
|
2019-01-18 14:57:15 -08:00
|
|
|
}
|
|
|
|
|
2019-03-07 12:29:43 -08:00
|
|
|
"testnet-staging" = {
|
|
|
|
env = "staging"
|
|
|
|
create_mainnet = 0
|
|
|
|
create_testnet = 1
|
|
|
|
create_misc = 0
|
|
|
|
}
|
|
|
|
|
|
|
|
"testnet-prod" = {
|
|
|
|
env = "prod"
|
|
|
|
create_mainnet = 0
|
|
|
|
create_testnet = 1
|
|
|
|
create_misc = 0
|
2019-01-18 14:57:15 -08:00
|
|
|
}
|
|
|
|
|
2019-03-07 12:29:43 -08:00
|
|
|
"misc" = {
|
|
|
|
env = ""
|
|
|
|
create_mainnet = 0
|
|
|
|
create_testnet = 0
|
|
|
|
create_misc = 1
|
2019-01-16 10:22:44 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-07 12:29:43 -08:00
|
|
|
env = "${lookup(local.context_variables[terraform.workspace], "env")}"
|
|
|
|
create_mainnet = "${lookup(local.context_variables[terraform.workspace], "create_mainnet")}"
|
|
|
|
create_testnet = "${lookup(local.context_variables[terraform.workspace], "create_testnet")}"
|
|
|
|
create_misc = "${lookup(local.context_variables[terraform.workspace], "create_misc")}"
|
2019-01-16 10:22:44 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "project" {
|
|
|
|
type = "string"
|
2019-01-29 11:28:40 -08:00
|
|
|
default = "satellite-api"
|
2019-01-16 10:22:44 -08:00
|
|
|
}
|
|
|
|
|
2019-01-18 14:57:15 -08:00
|
|
|
variable "name" {
|
|
|
|
type = "string"
|
|
|
|
default = "satapi-tor"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "create_resources" {
|
|
|
|
type = "string"
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2019-01-16 10:22:44 -08:00
|
|
|
variable "ssl_cert" {
|
2019-02-26 16:44:51 -08:00
|
|
|
type = "list"
|
|
|
|
default = ["", ""]
|
2019-01-16 10:22:44 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "rpcuser" {
|
|
|
|
type = "string"
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "rpcpass" {
|
|
|
|
type = "string"
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "host" {
|
2019-02-26 16:44:51 -08:00
|
|
|
type = "list"
|
|
|
|
default = ["", ""]
|
2019-01-16 10:22:44 -08:00
|
|
|
}
|
|
|
|
|
2019-02-27 12:47:01 -08:00
|
|
|
variable "space_host" {
|
|
|
|
type = "string"
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2019-01-18 14:57:15 -08:00
|
|
|
variable "onion_host" {
|
|
|
|
type = "string"
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2019-01-16 10:22:44 -08:00
|
|
|
variable "region" {
|
|
|
|
type = "string"
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "zone" {
|
|
|
|
type = "string"
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "instance_type" {
|
2019-02-26 16:44:51 -08:00
|
|
|
type = "list"
|
|
|
|
default = ["", "", ""]
|
2019-01-18 14:57:15 -08:00
|
|
|
}
|
|
|
|
|
2019-01-16 10:22:44 -08:00
|
|
|
variable "timeout" {
|
|
|
|
type = "string"
|
|
|
|
default = 15
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "prom_service_acct" {
|
|
|
|
type = "string"
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2019-02-26 16:44:51 -08:00
|
|
|
variable "prom_allowed_source_ip" {
|
|
|
|
type = "string"
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2019-01-16 10:22:44 -08:00
|
|
|
variable "opsgenie_key" {
|
|
|
|
type = "string"
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2019-02-26 14:03:37 -08:00
|
|
|
variable "satellite_lb" {
|
2019-02-27 12:47:01 -08:00
|
|
|
type = "string"
|
2019-02-26 14:03:37 -08:00
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "satellite_api_lb" {
|
2019-02-27 12:47:01 -08:00
|
|
|
type = "string"
|
2019-02-26 14:03:37 -08:00
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "satellite_api_lb_staging" {
|
2019-02-27 12:47:01 -08:00
|
|
|
type = "string"
|
2019-02-26 14:03:37 -08:00
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2019-01-16 10:22:44 -08:00
|
|
|
# Overwritten by CI
|
|
|
|
variable "ionosphere_docker" {
|
|
|
|
type = "string"
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "ionosphere_sse_docker" {
|
|
|
|
type = "string"
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
# Less frequently updated images
|
|
|
|
variable "bitcoin_docker" {
|
|
|
|
type = "string"
|
2019-01-29 11:28:40 -08:00
|
|
|
default = "blockstream/bitcoind@sha256:91ba0790a0080a99a529e73ef9b14e2d6cf0a30f81d54bfa3729bb47b105b36c"
|
2019-01-16 10:22:44 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "lightning_docker" {
|
|
|
|
type = "string"
|
2019-03-11 16:50:04 -07:00
|
|
|
default = "blockstream/lightningd@sha256:b577dcb8d00ec4bc340884a26f5dfffb7be25dcc4ece48b7e465b3238944ec2c"
|
2019-01-16 10:22:44 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "charge_docker" {
|
|
|
|
type = "string"
|
2019-01-29 11:28:40 -08:00
|
|
|
default = "blockstream/charged@sha256:0d49c1202b8b718b5a93f7e82509d3d724f9d18ff6c14376347f67866ac47ff8"
|
2019-01-16 10:22:44 -08:00
|
|
|
}
|
2019-01-18 14:57:15 -08:00
|
|
|
|
|
|
|
variable "tor_docker" {
|
|
|
|
type = "string"
|
2019-02-14 15:41:07 -08:00
|
|
|
default = "blockstream/tor@sha256:f4d1373cde79fd79b467d2d6da88e37b0da137924bc10ae2d51a83c686c2c125"
|
2019-02-13 14:36:26 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "node_exporter_docker" {
|
|
|
|
type = "string"
|
|
|
|
default = "prom/node-exporter@sha256:55302581333c43d540db0e144cf9e7735423117a733cdec27716d87254221086"
|
2019-01-18 14:57:15 -08:00
|
|
|
}
|
|
|
|
|
2019-02-26 16:44:51 -08:00
|
|
|
variable "prom_docker" {
|
|
|
|
type = "string"
|
|
|
|
default = "blockstream/prometheus@sha256:cab8c2359ab187aa6c9e9c7fcfcc3060b62742417030a77862c747e091d3c6d6"
|
|
|
|
}
|
|
|
|
|
2019-01-18 14:57:15 -08:00
|
|
|
variable "gcloud_docker" {
|
|
|
|
type = "string"
|
2019-04-18 19:31:02 -07:00
|
|
|
default = "google/cloud-sdk@sha256:78e68a98c5d6aa36eca45099bae38a1544a1688fd16b506fb914a29fdf6e4afa"
|
2019-01-18 14:57:15 -08:00
|
|
|
}
|