Skip to content

Commit

Permalink
created gps db replica server
Browse files Browse the repository at this point in the history
  • Loading branch information
mamari90 committed Dec 17, 2024
1 parent 999313f commit dc17465
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/domains/gps-common/03_postgresql_gpd_db.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module "postgres_flexible_server_private_db" {
delegated_subnet_id = module.postgres_flexible_snet[0].id
public_network_access_enabled = var.pgres_flex_params.public_network_access_enabled

### admin credentials
### admin credentials
administrator_login = data.azurerm_key_vault_secret.pgres_admin_login.value
administrator_password = data.azurerm_key_vault_secret.pgres_admin_pwd.value

Expand All @@ -89,7 +89,7 @@ module "postgres_flexible_server_private_db" {

tags = var.tags

# alert section
# alert section
custom_metric_alerts = var.pgres_flex_params.alerts_enabled ? var.pgflex_public_metric_alerts : {}
alerts_enabled = var.pgres_flex_params.alerts_enabled

Expand Down
9 changes: 7 additions & 2 deletions src/domains/gps-common/03_postgresql_replica.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,20 @@ module "postgresql_gpd_replica_db" {
delegated_subnet_id = module.postgres_flexible_snet_replica[0].id
private_endpoint_enabled = var.pgres_flex_params.private_endpoint_enabled

sku_name = "GP_Standard_D16ds_v4" # var.pgres_flex_params.sku_name  NEWGPD-DB : DEPRECATED switch to var.pgres_flex_params.sku_name
sku_name = var.pgres_flex_params.sku_name

high_availability_enabled = false
pgbouncer_enabled = var.pgres_flex_params.pgbouncer_enabled

source_server_id = module.postgres_flexible_server_private[0].id # NEWGPD-DB : DEPRECATED switch to new istance postgres_flexible_server_private_db
storage_mb = var.pgres_flex_params.storage_mb

source_server_id = module.postgres_flexible_server_private_db.id #NEWGPD-DB : DEPRECATED switch to new istance postgres_flexible_server_private_db

diagnostic_settings_enabled = false

max_connections = var.pgres_flex_params.max_connections
max_worker_process = var.pgres_flex_params.max_worker_process

log_analytics_workspace_id = data.azurerm_log_analytics_workspace.log_analytics.id
zone = 2
tags = var.tags
Expand Down
5 changes: 3 additions & 2 deletions src/domains/gps-common/99_main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ data "azurerm_subscription" "current" {}
data "azurerm_client_config" "current" {}

module "__v3__" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3?ref=v8.63.0"
}
# 8.64.0
source = "git::https://github.com/pagopa/terraform-azurerm-v3?ref=ff49c94c7bfb8f2867e550483d8acc125bf516a7"
}
2 changes: 1 addition & 1 deletion src/domains/gps-common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

| Name | Source | Version |
|------|--------|---------|
| <a name="module___v3__"></a> [\_\_v3\_\_](#module\_\_\_v3\_\_) | git::https://github.com/pagopa/terraform-azurerm-v3 | v8.63.0 |
| <a name="module___v3__"></a> [\_\_v3\_\_](#module\_\_\_v3\_\_) | git::https://github.com/pagopa/terraform-azurerm-v3 | ff49c94c7bfb8f2867e550483d8acc125bf516a7 |
| <a name="module_flows"></a> [flows](#module\_flows) | ./.terraform/modules/__v3__/storage_account | n/a |
| <a name="module_gpd_cosmosdb_containers"></a> [gpd\_cosmosdb\_containers](#module\_gpd\_cosmosdb\_containers) | ./.terraform/modules/__v3__/cosmosdb_sql_container | n/a |
| <a name="module_gpd_cosmosdb_database"></a> [gpd\_cosmosdb\_database](#module\_gpd\_cosmosdb\_database) | ./.terraform/modules/__v3__/cosmosdb_sql_database | n/a |
Expand Down
2 changes: 1 addition & 1 deletion src/domains/gps-common/env/weu-uat/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pgres_flex_params = {
standby_availability_zone = 2
pgbouncer_enabled = true
alerts_enabled = false
max_connections = 5000
max_connections = 1700
enable_private_dns_registration = true
enable_private_dns_registration_virtual_endpoint = false
max_worker_process = 32
Expand Down

0 comments on commit dc17465

Please sign in to comment.