Skip to content

Commit

Permalink
DTSAM-3046 Decommission V11 DB Master - V11 TF module removed, azurer…
Browse files Browse the repository at this point in the history
…m prevent_deletion_if_contains_resources = false added, azurerm version upgraded ~> 3.103.1 (#1926)
  • Loading branch information
mikebrownccd authored May 23, 2024
1 parent 2db30b1 commit b2d766e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 25 deletions.
23 changes: 0 additions & 23 deletions infrastructure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,29 +69,6 @@ resource "azurerm_key_vault_secret" "POSTGRES_DATABASE" {
key_vault_id = data.azurerm_key_vault.am_key_vault.id
}

resource "azurerm_key_vault_secret" "POSTGRES-PASS-V11" {
name = join("-", [var.component, "POSTGRES-PASS-V11"])
value = module.org-role-mapping-database-v11.postgresql_password
key_vault_id = data.azurerm_key_vault.am_key_vault.id
}

module "org-role-mapping-database-v11" {
source = "git@github.com:hmcts/cnp-module-postgres?ref=master"
name = join("-", [local.app_full_name, "postgres-db", "v11"])
product = var.product
location = var.location
env = var.env
component = var.component
subscription = var.subscription
postgresql_user = var.postgresql_user
database_name = var.database_name
storage_mb = var.database_storage_mb
sku_name = var.database_sku_name
sku_capacity = var.database_sku_capacity
common_tags = var.common_tags
postgresql_version = "11"
}

resource "azurerm_key_vault_secret" "POSTGRES-PASS-V15" {
name = "${var.component}-POSTGRES-PASS-V15"
value = module.org-role-mapping-database-v15.password
Expand Down
8 changes: 6 additions & 2 deletions infrastructure/terraform.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
provider "azurerm" {
features {}
features {
resource_group {
prevent_deletion_if_contains_resources = false
}
}
}

provider "azurerm" {
Expand All @@ -15,7 +19,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 3.102.0"
version = "~> 3.103.1"
}
azuread = {
source = "hashicorp/azuread"
Expand Down

0 comments on commit b2d766e

Please sign in to comment.