From e5637dd879ef1fce4cd0938058b6f8d6570bcb6b Mon Sep 17 00:00:00 2001 From: Adrian Stobbe Date: Fri, 29 Dec 2023 15:16:56 +0100 Subject: [PATCH] set node count through variable to make it easily overwriteable for testing --- terraform-provider-constellation/examples/full/aws/main.tf | 6 ++++-- .../examples/full/azure/main.tf | 6 ++++-- terraform-provider-constellation/examples/full/gcp/main.tf | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/terraform-provider-constellation/examples/full/aws/main.tf b/terraform-provider-constellation/examples/full/aws/main.tf index 9af6a2fe2..36da80d67 100644 --- a/terraform-provider-constellation/examples/full/aws/main.tf +++ b/terraform-provider-constellation/examples/full/aws/main.tf @@ -20,6 +20,8 @@ locals { attestation_variant = "aws-sev-snp" region = "us-east-2" zone = "us-east-2c" + control_plane_count = 3 + worker_count = 2 master_secret = random_bytes.master_secret.hex master_secret_salt = random_bytes.master_secret_salt.hex @@ -55,7 +57,7 @@ module "aws_infrastructure" { instance_type = "m6a.xlarge" disk_size = 30 disk_type = "gp3" - initial_count = 3 + initial_count = local.control_plane_count zone = local.zone }, worker_default = { @@ -63,7 +65,7 @@ module "aws_infrastructure" { instance_type = "m6a.xlarge" disk_size = 30 disk_type = "gp3" - initial_count = 2 + initial_count = local.worker_count zone = local.zone } } diff --git a/terraform-provider-constellation/examples/full/azure/main.tf b/terraform-provider-constellation/examples/full/azure/main.tf index 6220f36c5..f51b347fc 100644 --- a/terraform-provider-constellation/examples/full/azure/main.tf +++ b/terraform-provider-constellation/examples/full/azure/main.tf @@ -19,6 +19,8 @@ locals { csp = "azure" attestation_variant = "azure-sev-snp" location = "northeurope" + control_plane_count = 3 + worker_count = 2 master_secret = random_bytes.master_secret.hex master_secret_salt = random_bytes.master_secret_salt.hex @@ -56,14 +58,14 @@ module "azure_infrastructure" { instance_type = "Standard_DC4as_v5" disk_size = 30 disk_type = "Premium_LRS" - initial_count = 3 + initial_count = local.control_plane_count }, worker_default = { role = "worker" instance_type = "Standard_DC4as_v5" disk_size = 30 disk_type = "Premium_LRS" - initial_count = 2 + initial_count = local.worker_count } } location = local.location diff --git a/terraform-provider-constellation/examples/full/gcp/main.tf b/terraform-provider-constellation/examples/full/gcp/main.tf index 552b1a823..faa0d82e8 100644 --- a/terraform-provider-constellation/examples/full/gcp/main.tf +++ b/terraform-provider-constellation/examples/full/gcp/main.tf @@ -21,6 +21,8 @@ locals { region = "europe-west3" zone = "europe-west3-b" project_id = "constellation-331613" + control_plane_count = 3 + worker_count = 2 master_secret = random_bytes.master_secret.hex master_secret_salt = random_bytes.master_secret_salt.hex @@ -58,7 +60,7 @@ module "gcp_infrastructure" { instance_type = "n2d-standard-4" disk_size = 30 disk_type = "pd-ssd" - initial_count = 3 + initial_count = local.control_plane_count zone = local.zone }, worker_default = { @@ -66,7 +68,7 @@ module "gcp_infrastructure" { instance_type = "n2d-standard-4" disk_size = 30 disk_type = "pd-ssd" - initial_count = 2 + initial_count = local.worker_count zone = local.zone } }