Skip to content

Commit

Permalink
Clean up (#2574)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblackmoor authored Jul 31, 2024
1 parent faab179 commit 5ce116f
Show file tree
Hide file tree
Showing 15 changed files with 11 additions and 383 deletions.
2 changes: 0 additions & 2 deletions charts/rpe-send-letter-service/values.aat.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ java:
alias: UPLOAD_SUMMARY_REPORT_RECIPIENTS
- name: encryption-public-key
alias: ENCRYPTION_PUBLIC_KEY
- name: app-insights-instrumentation-key
alias: azure.application-insights.instrumentation-key
- name: reports-email-password
alias: SMTP_PASSWORD
- name: reports-email-username
Expand Down
7 changes: 0 additions & 7 deletions infrastructure/aat.tfvars
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
vault_section = "preprod"
file_cleanup_enabled = "true"

capacity = "2"

aks_subscription_id = "96c274ce-846d-4e48-89a7-d528432298a7"

storage_account_repl_type = "ZRS"
53 changes: 0 additions & 53 deletions infrastructure/data.tf

This file was deleted.

5 changes: 1 addition & 4 deletions infrastructure/demo.tfvars
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
vault_section = "preprod"
enable_ase = false
aks_subscription_id = "d025fece-ce99-4df2-b7a9-b649d3ff2060"
storage_account_repl_type = "ZRS"

6 changes: 0 additions & 6 deletions infrastructure/ithc.tfvars
Original file line number Diff line number Diff line change
@@ -1,6 +0,0 @@
vault_section = "preprod"
enable_ase = false

aks_subscription_id = "62864d44-5da9-4ae9-89e7-0cf33942fa09"

storage_account_repl_type = "ZRS"
28 changes: 1 addition & 27 deletions infrastructure/main.tf
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@


# Make sure the resource group exists
resource "azurerm_resource_group" "rg" {
name = "${var.product}-${var.component}-${var.env}"
location = var.location_app
location = var.location
tags = var.common_tags
}

locals {
ftp_private_key = data.azurerm_key_vault_secret.ftp_private_key.value
ftp_public_key = data.azurerm_key_vault_secret.ftp_public_key.value
ftp_user = data.azurerm_key_vault_secret.ftp_user.value

encryption_public_key = data.azurerm_key_vault_secret.encryption_public_key.value

product = "bulk-print"
tags = var.common_tags
}

# region save DB details to Azure Key Vault
module "send-letter-key-vault" {
source = "[email protected]:hmcts/cnp-module-key-vault?ref=master"
Expand All @@ -35,19 +22,6 @@ module "send-letter-key-vault" {
additional_managed_identities_access = ["rpe-shared", "bulk-scan"]
}

data "azurerm_key_vault" "s2s_key_vault" {
name = "s2s-${var.env}"
resource_group_name = "rpe-service-auth-provider-${var.env}"
}

resource "azurerm_key_vault_secret" "APP-INSTRUMENTATION-KEY" {
key_vault_id = module.send-letter-key-vault.key_vault_id
name = "app-insights-instrumentation-key"
value = module.application_insights.instrumentation_key
}

# endregion

data "azurerm_key_vault_secret" "smtp_username" {
name = "reports-email-username"
key_vault_id = module.send-letter-key-vault.key_vault_id
Expand Down
31 changes: 0 additions & 31 deletions infrastructure/output.tf

This file was deleted.

2 changes: 1 addition & 1 deletion infrastructure/perftest.tfvars
Original file line number Diff line number Diff line change
@@ -1 +1 @@
aks_subscription_id = "8a07fdcd-6abd-48b3-ad88-ff737a4b9e3c"

12 changes: 0 additions & 12 deletions infrastructure/perftest_mgmt_subnet.tf

This file was deleted.

19 changes: 0 additions & 19 deletions infrastructure/preview_vnet.tf

This file was deleted.

13 changes: 0 additions & 13 deletions infrastructure/prod.tfvars
Original file line number Diff line number Diff line change
@@ -1,15 +1,2 @@
vault_section = "prod"
file_cleanup_enabled = "false"

capacity = "2"

smtp_host = "smtp.office365.com"

upload_summary_report_enabled = "true"

aks_subscription_id = "8cbc6f36-7c56-4963-9d36-739db5d00b27"

storage_account_repl_type = "ZRS"

pgsql_storage_mb = "131072"
pgsql_sku = "GP_Standard_D4s_v3"
97 changes: 0 additions & 97 deletions infrastructure/storage-account.tf

This file was deleted.

1 change: 0 additions & 1 deletion infrastructure/tf-db-flexible-secrets.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Postgres 15 flexible server store secrets in key vault
locals {
flexible_secret_prefix = "${var.component}-POSTGRES-FLEXIBLE"
standard_secret_prefix = "${var.component}-POSTGRES"

flexible_secrets = [
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/tf-db-flexible.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module "postgresql" {
name = local.db_host_name
product = "send-letter"
component = var.component
location = var.location_db
location = var.location
env = var.env
pgsql_admin_username = local.db_name
pgsql_databases = [
Expand Down
Loading

0 comments on commit 5ce116f

Please sign in to comment.