|
| 1 | +variable "environment_prefix" { |
| 2 | + type = string |
| 3 | + description = "The environment prefix to deploy: testing, pre-release or release" |
| 4 | +} |
| 5 | + |
| 6 | +variable "environment_suffix" { |
| 7 | + type = string |
| 8 | + description = "The environment suffix to deploy" |
| 9 | +} |
| 10 | + |
| 11 | +variable "cardano_network" { |
| 12 | + type = string |
| 13 | + description = "The Cardano network name to attach: preview, preprod or mainnet" |
| 14 | +} |
| 15 | + |
| 16 | +locals { |
| 17 | + environment_name_short = format("%s%s", "${var.environment_prefix}-${var.cardano_network}", var.environment_suffix != "" ? "-${var.environment_suffix}" : "") |
| 18 | + environment_name = "mithril-${local.environment_name_short}" |
| 19 | +} |
| 20 | + |
| 21 | +variable "google_region" { |
| 22 | + type = string |
| 23 | + description = "The region on GCP" |
| 24 | +} |
| 25 | + |
| 26 | +variable "google_zone" { |
| 27 | + type = string |
| 28 | + description = "The zone on GCP" |
| 29 | +} |
| 30 | + |
| 31 | +variable "google_machine_type" { |
| 32 | + type = string |
| 33 | + description = "The machine type on which to run the VM on GCP" |
| 34 | +} |
| 35 | + |
| 36 | +variable "google_service_credentials_json" { |
| 37 | + type = string |
| 38 | + description = "The credentials of the GCP service account" |
| 39 | +} |
| 40 | + |
| 41 | +variable "google_application_credentials_json" { |
| 42 | + type = string |
| 43 | + description = "Service account JSON key file used by aggregator to upload files to gcloud storage" |
| 44 | +} |
| 45 | + |
| 46 | +locals { |
| 47 | + google_service_credentials_json_decoded = jsondecode(file(var.google_service_credentials_json)) |
| 48 | + google_service_account_private_key = local.google_service_credentials_json_decoded.private_key |
| 49 | + google_project_id = local.google_service_credentials_json_decoded.project_id |
| 50 | +} |
| 51 | + |
| 52 | +variable "mithril_api_domain" { |
| 53 | + type = string |
| 54 | + description = "The Mithril api (sub)domain name of service to deploy" |
| 55 | +} |
| 56 | + |
| 57 | +variable "mithril_image_id" { |
| 58 | + type = string |
| 59 | + description = "The Mithril image tag of service to deploy" |
| 60 | +} |
| 61 | + |
| 62 | +variable "mithril_genesis_verification_key_url" { |
| 63 | + type = string |
| 64 | + description = "The url of the Mithril genesis verification key used by to verify a genesis certificate" |
| 65 | +} |
| 66 | +variable "mithril_genesis_secret_key" { |
| 67 | + type = string |
| 68 | + description = "The Mithril genesis secret key used by the aggregator to bootstrap a genesis certificate (test only)" |
| 69 | +} |
| 70 | + |
| 71 | +variable "mithril_signers" { |
| 72 | + type = map(object({ |
| 73 | + pool_id = string |
| 74 | + })) |
| 75 | +} |
0 commit comments