From 0756e6577379ec4b9b4773cf04ab41237f83ce09 Mon Sep 17 00:00:00 2001 From: Alastair Lock Date: Tue, 5 May 2026 12:49:13 +0100 Subject: [PATCH] Removing POC environment from repo --- .github/workflows/test-deploy.yaml | 3 +- infrastructure/environments/poc/variables.sh | 12 -------- .../environments/poc/variables.tfvars | 13 -------- infrastructure/environments/poc/variables.yml | 4 --- scripts/terraform/terraform.mk | 30 ------------------- 5 files changed, 1 insertion(+), 61 deletions(-) delete mode 100644 infrastructure/environments/poc/variables.sh delete mode 100644 infrastructure/environments/poc/variables.tfvars delete mode 100644 infrastructure/environments/poc/variables.yml diff --git a/.github/workflows/test-deploy.yaml b/.github/workflows/test-deploy.yaml index e82f50c1..19654665 100644 --- a/.github/workflows/test-deploy.yaml +++ b/.github/workflows/test-deploy.yaml @@ -8,7 +8,6 @@ on: required: true type: choice options: - - poc - review - dev @@ -41,4 +40,4 @@ jobs: terraform_version: 1.11.4 - name: Terraform plan - run: make ${TARGET_ENV} ci poc-terraform-apply DOCKER_IMAGE_TAG=git-sha-${{ github.sha }} + run: make ${TARGET_ENV} ci terraform-plan DOCKER_IMAGE_TAG=git-sha-${{ github.sha }} diff --git a/infrastructure/environments/poc/variables.sh b/infrastructure/environments/poc/variables.sh deleted file mode 100644 index 37a3f30d..00000000 --- a/infrastructure/environments/poc/variables.sh +++ /dev/null @@ -1,12 +0,0 @@ -# Fix POC environment variables for terraform.mk - these differ from new prod like envs -REGION=UK South -APP_SHORT_NAME=lungcs - -ENVIRONMENT=poc -ENV_CONFIG=poc -AZURE_SUBSCRIPTION="Lung Cancer Screening - Dev" -HUB_SUBSCRIPTION="Lung Cancer Screening - Dev" -STORAGE_ACCOUNT_RG=rg-tfstate-poc-uks -TERRAFORM_MODULES_REF=main -ENABLE_SOFT_DELETE=false -DOCKER_IMAGE=ghcr.io/nhsdigital/lung_cancer_screening diff --git a/infrastructure/environments/poc/variables.tfvars b/infrastructure/environments/poc/variables.tfvars deleted file mode 100644 index e03e686c..00000000 --- a/infrastructure/environments/poc/variables.tfvars +++ /dev/null @@ -1,13 +0,0 @@ -deploy_database_as_container = false -features = { - front_door = false - hub_and_spoke = false - private_networking = false -} -fetch_secrets_from_app_key_vault = true -github_mi_name = "mi-lungcs-poc-ghtoaz-uks" -key_vault_secrets_officer_groups = ["Azure-Lung-Cancer-Screening---Dev-Owner"] -postgres_backup_retention_days = 7 -postgres_geo_redundant_backup_enabled = false -protect_keyvault = false -vnet_address_space = "10.65.0.0/16" diff --git a/infrastructure/environments/poc/variables.yml b/infrastructure/environments/poc/variables.yml deleted file mode 100644 index df81dbff..00000000 --- a/infrastructure/environments/poc/variables.yml +++ /dev/null @@ -1,4 +0,0 @@ -OIDC_RP_CLIENT_ID: lcrc -OIDC_OP_FQDN: https://auth.sandpit.signin.nhs.uk -DISABLE_RECENT_SUBMISSION_LIMITATION: true -CSRF_TRUSTED_ORIGINS: https://poc.non-live.digital-lung-cancer-screening.nhs.uk diff --git a/scripts/terraform/terraform.mk b/scripts/terraform/terraform.mk index f3b45da1..292673fd 100644 --- a/scripts/terraform/terraform.mk +++ b/scripts/terraform/terraform.mk @@ -8,10 +8,6 @@ bootstrap: --template-file "infrastructure/bootstrap/${BOOTSTRAP}.bicep" \ --parameters "infrastructure/bootstrap/environments/${HUB_TYPE}/${BOOTSTRAP}.bicepparam" - -poc: # Target the poc environment - make poc - $(eval include infrastructure/environments/poc/variables.sh) - hub-nonlive: # Target the non-live hub environment - make hub-nonlive $(eval include infrastructure/bootstrap/environments/nonlive/variables.sh) @@ -112,29 +108,3 @@ terraform-validate: terraform-init-no-backend # Validate Terraform changes - mak terraform-fmt: terraform -chdir=infrastructure/terraform/spoke fmt - - -# TODO: Delete these once we are in production like environments -poc-terraform-init: set-azure-account get-subscription-ids # Initialise Terraform - make terraform-init - $(eval STORAGE_ACCOUNT_NAME=sa${APP_SHORT_NAME}${ENV_CONFIG}tfstate) - $(eval export ARM_USE_AZUREAD=true) - - rm -rf infrastructure/modules/dtos-devops-templates - git -c advice.detachedHead=false clone --depth=1 --single-branch --branch ${TERRAFORM_MODULES_REF} \ - https://github.com/NHSDigital/dtos-devops-templates.git infrastructure/modules/dtos-devops-templates - - terraform -chdir=infrastructure/terraform/spoke init -upgrade -reconfigure \ - -backend-config=subscription_id=${HUB_SUBSCRIPTION_ID} \ - -backend-config=resource_group_name=${STORAGE_ACCOUNT_RG} \ - -backend-config=storage_account_name=${STORAGE_ACCOUNT_NAME} \ - -backend-config=key=${ENVIRONMENT}.tfstate - - $(eval export TF_VAR_app_short_name=${APP_SHORT_NAME}) - $(eval export TF_VAR_docker_image=${DOCKER_IMAGE}:${DOCKER_IMAGE_TAG}) - $(eval export TF_VAR_environment=${ENVIRONMENT}) - $(eval export TF_VAR_env_config=${ENV_CONFIG}) - $(eval export TF_VAR_hub=${HUB}) - $(eval export TF_VAR_hub_subscription_id=${HUB_SUBSCRIPTION_ID}) - -poc-terraform-apply: poc-terraform-init # Apply Terraform changes - make terraform-apply DOCKER_IMAGE_TAG=abcd123 - terraform -chdir=infrastructure/terraform/spoke apply -var-file ../../environments/${ENV_CONFIG}/variables.tfvars ${AUTO_APPROVE}