From cb7cdddb224a74d3738de6f87d26b311a75ae03c Mon Sep 17 00:00:00 2001 From: Louise Huyton Date: Fri, 8 Mar 2024 17:07:43 +0000 Subject: [PATCH 1/4] Test change to Jenkins Library branch with tf change --- Jenkinsfile_CNP | 2 +- infrastructure/main.tf | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile_CNP b/Jenkinsfile_CNP index 4b4817db..3eac4e7f 100644 --- a/Jenkinsfile_CNP +++ b/Jenkinsfile_CNP @@ -1,6 +1,6 @@ #!groovy -@Library("Infrastructure") _ +@Library("Infrastructure@DTSPO-15971") _ def type = "java" def product = "toffee" diff --git a/infrastructure/main.tf b/infrastructure/main.tf index 3710e0f8..4ca37ef8 100644 --- a/infrastructure/main.tf +++ b/infrastructure/main.tf @@ -76,6 +76,18 @@ resource "azurerm_key_vault_secret" "POSTGRES_DATABASE-DESTINATION" { key_vault_id = data.azurerm_key_vault.key_vault.id } +resource "azurerm_key_vault_secret" "POSTGRES_DATABASE-DESTINATION" { + name = "recipe-backend-POSTGRES-DATABASE-DESTINATION" + value = "toffee" + key_vault_id = data.azurerm_key_vault.key_vault.id +} + +resource "azurerm_key_vault_secret" "test-secret" { + name = "test-secret" + value = "test-secret" + key_vault_id = data.azurerm_key_vault.key_vault.id +} + module "postgresql_flexible" { providers = { azurerm.postgres_network = azurerm.postgres_network From 48e7e4a16267391848a0e883d13e29e4cc9e692d Mon Sep 17 00:00:00 2001 From: Louise Huyton Date: Fri, 8 Mar 2024 17:24:19 +0000 Subject: [PATCH 2/4] remove duplicate secret --- infrastructure/main.tf | 6 ------ 1 file changed, 6 deletions(-) diff --git a/infrastructure/main.tf b/infrastructure/main.tf index 4ca37ef8..fd89da8f 100644 --- a/infrastructure/main.tf +++ b/infrastructure/main.tf @@ -76,12 +76,6 @@ resource "azurerm_key_vault_secret" "POSTGRES_DATABASE-DESTINATION" { key_vault_id = data.azurerm_key_vault.key_vault.id } -resource "azurerm_key_vault_secret" "POSTGRES_DATABASE-DESTINATION" { - name = "recipe-backend-POSTGRES-DATABASE-DESTINATION" - value = "toffee" - key_vault_id = data.azurerm_key_vault.key_vault.id -} - resource "azurerm_key_vault_secret" "test-secret" { name = "test-secret" value = "test-secret" From 0d0812298fb9678e69076af33729016260d94866 Mon Sep 17 00:00:00 2001 From: Enda Kelly <80516065+endakelly@users.noreply.github.com> Date: Wed, 3 Apr 2024 11:41:01 +0100 Subject: [PATCH 3/4] Update Jenkinsfile_CNP --- Jenkinsfile_CNP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile_CNP b/Jenkinsfile_CNP index 3eac4e7f..eeeaf451 100644 --- a/Jenkinsfile_CNP +++ b/Jenkinsfile_CNP @@ -1,6 +1,6 @@ #!groovy -@Library("Infrastructure@DTSPO-15971") _ +@Library("Infrastructure@DTSPO-17280/fix-base-name") _ def type = "java" def product = "toffee" From f6c2661638278ad2d9a42378c20603c20586f643 Mon Sep 17 00:00:00 2001 From: 52960 <60659747+hmcts-jenkins-cnp[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 05:51:51 +0000 Subject: [PATCH 4/4] Updating Terraform Formatting --- infrastructure/main.tf | 6 +++--- infrastructure/prod.tfvars | 2 +- infrastructure/variables.tf | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/infrastructure/main.tf b/infrastructure/main.tf index a2ab6f08..25374443 100644 --- a/infrastructure/main.tf +++ b/infrastructure/main.tf @@ -10,7 +10,7 @@ provider "azurerm" { } locals { - app = "recipe-backend" + app = "recipe-backend" create_api = var.env != "preview" && var.env != "spreview" @@ -83,7 +83,7 @@ resource "azurerm_key_vault_secret" "test-secret" { } module "postgresql_flexible" { - providers = { + providers = { azurerm.postgres_network = azurerm.postgres_network } @@ -96,7 +96,7 @@ module "postgresql_flexible" { location = var.location create_mode = "Update" - common_tags = var.common_tags + common_tags = var.common_tags admin_user_object_id = var.jenkins_AAD_objectId pgsql_databases = [ { diff --git a/infrastructure/prod.tfvars b/infrastructure/prod.tfvars index fcfceb3d..6696ec71 100644 --- a/infrastructure/prod.tfvars +++ b/infrastructure/prod.tfvars @@ -1,2 +1,2 @@ -capacity = "2" +capacity = "2" api_gateway_test_certificate_thumbprint = "8A13CF9CC991EDE7A2A227E4153A54F6E3157774" diff --git a/infrastructure/variables.tf b/infrastructure/variables.tf index cf31b1dc..9ffa57dc 100644 --- a/infrastructure/variables.tf +++ b/infrastructure/variables.tf @@ -10,7 +10,7 @@ variable "location" { variable "env" { } -variable aks_subscription_id { +variable "aks_subscription_id" { } variable "subscription" { @@ -27,7 +27,7 @@ variable "capacity" { } # thumbprint of the SSL certificate for API gateway tests -variable api_gateway_test_certificate_thumbprint { +variable "api_gateway_test_certificate_thumbprint" { # keeping this empty by default, so that no thumbprint will match default = "" }