Skip to content

Commit

Permalink
[CES-117] Update Remote Content Cosmos DB secondary region #1306 (#1311)
Browse files Browse the repository at this point in the history
Co-authored-by: Krusty93 <[email protected]>
  • Loading branch information
Krusty93 and Krusty93 authored Nov 19, 2024
1 parent b36d549 commit 8c49c8c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions src/domains/cgn/_modules/cosmos/cosmos_account_cgn.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module "cosmos_account_cgn" {
offer_type = "Standard"
kind = "GlobalDocumentDB"

main_geo_location_zone_redundant = false
main_geo_location_zone_redundant = true

enable_free_tier = false
enable_automatic_failover = true
Expand All @@ -26,7 +26,7 @@ module "cosmos_account_cgn" {
{
location = var.secondary_location
failover_priority = 1
zone_redundant = true
zone_redundant = false
}
]

Expand All @@ -36,12 +36,7 @@ module "cosmos_account_cgn" {

ip_range = ""

# private endpoint
private_endpoint_sql_name = "${var.project}-cosmos-cgn-sql-endpoint"
private_endpoint_enabled = true
private_service_connection_sql_name = "${var.project}-cosmos-cgn-sql-endpoint"
subnet_id = var.private_endpoint_subnet_id
private_dns_zone_sql_ids = [data.azurerm_private_dns_zone.privatelink_documents.id]
private_endpoint_enabled = false

tags = var.tags
}
Expand All @@ -59,5 +54,10 @@ resource "azurerm_private_endpoint" "cosno_remote_content_itn" {
subresource_names = ["Sql"]
}

private_dns_zone_group {
name = "private-dns-zone-group"
private_dns_zone_ids = [data.azurerm_private_dns_zone.privatelink_documents.id]
}

tags = var.tags
}
4 changes: 2 additions & 2 deletions src/domains/cgn/prod/cosmos.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ module "cosmos" {
source = "../_modules/cosmos"

project = local.project
location = local.location
secondary_location = local.secondary_location
location = "italynorth"
secondary_location = "spaincentral"
resource_group_name = module.resource_groups.resource_group_cgn.name

private_endpoint_subnet_id = module.networking.subnet_pendpoints.id
Expand Down

0 comments on commit 8c49c8c

Please sign in to comment.