From cce965339597302eedf31f98d8c2798c019fe31d Mon Sep 17 00:00:00 2001 From: vipin-dfe Date: Thu, 19 Dec 2024 11:05:03 +0000 Subject: [PATCH] Configure number of replicas for app --- terraform/application/.terraform.lock.hcl | 2 ++ terraform/application/application.tf | 1 + terraform/application/config/production.tfvars.json | 3 ++- terraform/application/variables.tf | 4 ++++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/terraform/application/.terraform.lock.hcl b/terraform/application/.terraform.lock.hcl index 34c61aa..57c65df 100644 --- a/terraform/application/.terraform.lock.hcl +++ b/terraform/application/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/eppo/environment" { constraints = "1.3.5" hashes = [ "h1:1Af95/IhzW16rbX8kSApfrAi8vwc5+7uVbCeyVaGw2E=", + "h1:pceowuRAKcjLd+g4noIJdX6CBIWavlM4BvRTsGfH0uQ=", "zh:00e7a6bf7f0f09cc4871d7f4fee2c943ce61c05b9802365a97703d6c2e63e3dc", "zh:018d92e621177d053ed5c32e8220efa8c019852c4d60cc7539683bac28470d9b", "zh:12ca5162286b80b7f46bd013ae2007641132d201af12bc6adb872f9a0ff85b7a", @@ -70,6 +71,7 @@ provider "registry.terraform.io/statuscakedev/statuscake" { version = "2.2.2" constraints = "2.2.2" hashes = [ + "h1:nVaJkDBk4sv0yWFzg3p+yeJGzE8mB4KJv3Q6/UgU164=", "h1:wFoZJfmNvG6XTf65NLai67geSHqYV1Tilx7OITrHilE=", "zh:0916313344c579d6e05d70f88129a10fe48f7dabe0e61cad17874d6c496f288d", "zh:0d491ff72c2eda6482855033ca2146c5ace1663d07cb3da7253b59ed2e2ec6f4", diff --git a/terraform/application/application.tf b/terraform/application/application.tf index e19ea0b..2e3a8c4 100644 --- a/terraform/application/application.tf +++ b/terraform/application/application.tf @@ -31,6 +31,7 @@ module "web_application" { kubernetes_secret_name = module.application_configuration.kubernetes_secret_name web_port = 8080 probe_path = "/" + replicas = var.replicas docker_image = var.docker_image } diff --git a/terraform/application/config/production.tfvars.json b/terraform/application/config/production.tfvars.json index 9628d96..277a883 100644 --- a/terraform/application/config/production.tfvars.json +++ b/terraform/application/config/production.tfvars.json @@ -4,5 +4,6 @@ "environment": "production", "external_url": "https://technical-guidance.education.gov.uk/", "enable_monitoring": true, - "statuscake_contact_groups": [282453] + "statuscake_contact_groups": [282453], + "replicas": 2 } diff --git a/terraform/application/variables.tf b/terraform/application/variables.tf index 7b899b3..22c7e48 100644 --- a/terraform/application/variables.tf +++ b/terraform/application/variables.tf @@ -16,6 +16,10 @@ variable "config_short" { variable "service_name" { description = "Full name of the service. Lowercase and hyphen separated" } +variable "replicas" { + default = 1 + description = "Number of replicas for deployment" +} variable "service_short" { description = "Short name to identify the service. Up to 6 charcters." }