generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SDT-157: SDT: Upgrade Postgres database to v15 (#320)
* SDT-149: SDT: Timeout error when manually writing to dead letter queue * SDT-149: SDT: Timeout error when manually writing to dead letter queue * SDT-168: SDT: Allow database retention period to be specified on an environment basis (#285) * Update Terraform azurerm to v3.75.0 * Update dependency commons-io:commons-io to v2.14.0 * SDT-168: SDT: Allow database retention period to be specified on an environment basis * SDT-168: SDT: Allow database retention period to be specified on an environment basis --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * SDT-168: SDT: Allow database retention period to be specified on an environment basis * SDT-157: SDT: Upgrade Postgres database to v15 * SDT-157: SDT: Upgrade Postgres database to v15 * SDT-157: SDT: Upgrade Postgres database to v15 * SDT-157: SDT: Upgrade Postgres database to v15 * Disable git sync on demo branch * SDT-157: syn branches with master * suppress CVE-2023-44487 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
- Loading branch information
1 parent
8b66feb
commit b1af09d
Showing
18 changed files
with
90 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM postgres:11 | ||
FROM postgres:15 | ||
|
||
COPY init-db.sh /docker-entrypoint-initdb.d | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
database_backup_retention_days=7 | ||
sku = "Standard" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,18 +7,19 @@ module "postgresql" { | |
azurerm.postgres_network = azurerm.private_endpoint | ||
} | ||
|
||
admin_user_object_id = var.jenkins_AAD_objectId | ||
business_area = "cft" | ||
common_tags = local.tags | ||
component = var.component | ||
env = var.env | ||
admin_user_object_id = var.jenkins_AAD_objectId | ||
business_area = "cft" | ||
common_tags = local.tags | ||
component = var.component | ||
env = var.env | ||
pgsql_databases = [ | ||
{ | ||
name = "civil_sdt" | ||
} | ||
] | ||
pgsql_version = "11" | ||
product = var.product | ||
pgsql_version = "11" | ||
product = var.product | ||
backup_retention_days = "${var.database_backup_retention_days}" | ||
} | ||
|
||
# Create secret for database user | ||
|
@@ -41,3 +42,48 @@ resource "azurerm_key_vault_secret" "POSTGRES-HOST" { | |
value = module.postgresql.fqdn | ||
key_vault_id = module.civil_sdt_key_vault.key_vault_id | ||
} | ||
|
||
|
||
module "postgresql-v15" { | ||
source = "[email protected]:hmcts/terraform-module-postgresql-flexible?ref=master" | ||
|
||
providers = { | ||
azurerm.postgres_network = azurerm.private_endpoint | ||
} | ||
|
||
admin_user_object_id = var.jenkins_AAD_objectId | ||
business_area = "cft" | ||
common_tags = local.tags | ||
component = var.component | ||
env = var.env | ||
pgsql_databases = [ | ||
{ | ||
name = "civil_sdt" | ||
} | ||
] | ||
pgsql_version = "15" | ||
product = var.product | ||
name = join("-", [var.product, var.component, "v15"]) | ||
backup_retention_days = "${var.database_backup_retention_days}" | ||
} | ||
|
||
# Create secret for database user | ||
resource "azurerm_key_vault_secret" "POSTGRES-USER-V15" { | ||
name = "civil-sdt-POSTGRES-USER-V15" | ||
value = module.postgresql-v15.username | ||
key_vault_id = module.civil_sdt_key_vault.key_vault_id | ||
} | ||
|
||
# Create secret for database password | ||
resource "azurerm_key_vault_secret" "POSTGRES-PASS-V15" { | ||
name = "civil-sdt-POSTGRES-PASS-V15" | ||
value = module.postgresql-v15.password | ||
key_vault_id = module.civil_sdt_key_vault.key_vault_id | ||
} | ||
|
||
# Create secret for database host | ||
resource "azurerm_key_vault_secret" "POSTGRES-HOST-V15" { | ||
name = "civil-sdt-POSTGRES-HOST-V15" | ||
value = module.postgresql-v15.fqdn | ||
key_vault_id = module.civil_sdt_key_vault.key_vault_id | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
database_backup_retention_days=7 | ||
sku = "Standard" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
database_backup_retention_days=7 | ||
sku = "Standard" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
database_backup_retention_days=7 | ||
sku = "Standard" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.