Skip to content

Commit 53d137f

Browse files
committed
Add default values to terraform vars
1 parent 8fbf8ac commit 53d137f

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

mithril-infra/main.vm.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ terraform {
88
}
99

1010
provider "google" {
11-
credentials = file(var.google_service_credentials_json)
11+
credentials = file(var.google_service_credentials_json_file)
1212
project = local.google_project_id
1313
region = var.google_region
1414
zone = var.google_zone

mithril-infra/variables.tf

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ variable "environment_prefix" {
66
variable "environment_suffix" {
77
type = string
88
description = "The environment suffix to deploy"
9+
default = ""
910
}
1011

1112
variable "cardano_network" {
@@ -21,19 +22,22 @@ locals {
2122
variable "google_region" {
2223
type = string
2324
description = "The region on GCP"
25+
default = "europe-west1"
2426
}
2527

2628
variable "google_zone" {
2729
type = string
2830
description = "The zone on GCP"
31+
default = "europe-west1-b"
2932
}
3033

3134
variable "google_machine_type" {
3235
type = string
3336
description = "The machine type on which to run the VM on GCP"
37+
default = "e2-medium"
3438
}
3539

36-
variable "google_service_credentials_json" {
40+
variable "google_service_credentials_json_file" {
3741
type = string
3842
description = "The credentials of the GCP service account"
3943
}
@@ -45,9 +49,9 @@ variable "google_storage_bucket_max_age" {
4549
}
4650

4751
locals {
48-
google_service_credentials_json_decoded = jsondecode(file(var.google_service_credentials_json))
49-
google_service_account_private_key = local.google_service_credentials_json_decoded.private_key
50-
google_project_id = local.google_service_credentials_json_decoded.project_id
52+
google_service_credentials_json_file_decoded = jsondecode(file(var.google_service_credentials_json_file))
53+
google_service_account_private_key = local.google_service_credentials_json_file_decoded.private_key
54+
google_project_id = local.google_service_credentials_json_file_decoded.project_id
5155
}
5256

5357
variable "mithril_api_domain" {
@@ -73,4 +77,9 @@ variable "mithril_signers" {
7377
type = map(object({
7478
pool_id = string
7579
}))
80+
default = {
81+
"1" = {
82+
pool_id = "pool15qde6mnkc0jgycm69ua0grwxmmu0tke54h5uhml0j8ndw3kcu9x",
83+
}
84+
}
7685
}

0 commit comments

Comments
 (0)