generated from pagopa/terraform-infrastructure-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Italy Apim open routes and dns private link (#2049)
* upgrated modules to v8.13.0 * renaming monitoring file * removed dns private link for italy, it will be done into core-itn * added dns private data and link * changed file name * fix peering flags * updated azurerm provider version to v3.103.1 * converted from format to string interpolation * app gw integration now points to old apim v1 * next-core terraform lock updated * added <env>.platform only for italy to connect the apim * pre-commit fixs * nodo-switcher: removed providers not needed * pre-commit fixs
- Loading branch information
1 parent
877d7c7
commit 376cac2
Showing
25 changed files
with
459 additions
and
414 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
data "azurerm_private_dns_zone" "db_nodo_pagamenti_com" { | ||
name = "${var.env_short}.db-nodo-pagamenti.com" | ||
resource_group_name = "pagopa-${var.env_short}-data-rg" | ||
} | ||
|
||
data "azurerm_private_dns_zone" "internal_postgresql_pagopa_it" { | ||
name = "${var.env_short}.internal.postgresql.pagopa.it" | ||
resource_group_name = "pagopa-${var.env_short}-vnet-rg" | ||
} | ||
|
||
# | ||
# ⚠️ This will be enabled after apim migration, now it will use a special one created in Italy | ||
# | ||
# data "azurerm_private_dns_zone" "dev_platform_pagopa_it" { | ||
# name = "dev.platform.pagopa.it" | ||
# resource_group_name = "pagopa-${var.env_short}-vnet-rg" | ||
# } | ||
|
||
data "azurerm_private_dns_zone" "internal_dev_platform_pagopa_it" { | ||
name = "internal.dev.platform.pagopa.it" | ||
resource_group_name = "pagopa-${var.env_short}-vnet-rg" | ||
} | ||
|
||
data "azurerm_private_dns_zone" "privatelink_azurecr_io" { | ||
name = "privatelink.azurecr.io" | ||
resource_group_name = "pagopa-${var.env_short}-vnet-rg" | ||
} | ||
|
||
data "azurerm_private_dns_zone" "privatelink_blob_core_windows_net" { | ||
name = "privatelink.blob.core.windows.net" | ||
resource_group_name = "pagopa-${var.env_short}-vnet-rg" | ||
} | ||
|
||
data "azurerm_private_dns_zone" "privatelink_datafactory_azure_net" { | ||
name = "privatelink.datafactory.azure.net" | ||
resource_group_name = "pagopa-${var.env_short}-vnet-rg" | ||
} | ||
|
||
data "azurerm_private_dns_zone" "privatelink_documents_azure_com" { | ||
name = "privatelink.documents.azure.com" | ||
resource_group_name = "pagopa-${var.env_short}-vnet-rg" | ||
} | ||
|
||
data "azurerm_private_dns_zone" "privatelink_mongo_cosmos_azure_com" { | ||
name = "privatelink.mongo.cosmos.azure.com" | ||
resource_group_name = "pagopa-${var.env_short}-vnet-rg" | ||
} | ||
|
||
data "azurerm_private_dns_zone" "privatelink_queue_core_windows_net" { | ||
name = "privatelink.queue.core.windows.net" | ||
resource_group_name = "pagopa-${var.env_short}-vnet-rg" | ||
} | ||
|
||
data "azurerm_private_dns_zone" "privatelink_redis_cache_windows_net" { | ||
name = "privatelink.redis.cache.windows.net" | ||
resource_group_name = "pagopa-${var.env_short}-vnet-rg" | ||
} | ||
|
||
data "azurerm_private_dns_zone" "privatelink_servicebus_windows_net" { | ||
name = "privatelink.servicebus.windows.net" | ||
resource_group_name = "pagopa-${var.env_short}-msg-rg" | ||
} | ||
|
||
data "azurerm_private_dns_zone" "privatelink_table_core_windows_net" { | ||
name = "privatelink.table.core.windows.net" | ||
resource_group_name = "pagopa-${var.env_short}-vnet-rg" | ||
} | ||
|
||
data "azurerm_private_dns_zone" "privatelink_table_cosmos_azure_com" { | ||
name = "privatelink.table.cosmos.azure.com" | ||
resource_group_name = "pagopa-${var.env_short}-vnet-rg" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
resource "azurerm_private_dns_zone_virtual_network_link" "db_nodo_pagamenti_com_vnet_link" { | ||
name = module.vnet_italy[0].name | ||
private_dns_zone_name = data.azurerm_private_dns_zone.db_nodo_pagamenti_com.name | ||
resource_group_name = data.azurerm_private_dns_zone.db_nodo_pagamenti_com.resource_group_name | ||
virtual_network_id = module.vnet_italy[0].id | ||
tags = var.tags | ||
} | ||
|
||
resource "azurerm_private_dns_zone_virtual_network_link" "internal_postgresql_pagopa_it_vnet_link" { | ||
name = module.vnet_italy[0].name | ||
private_dns_zone_name = data.azurerm_private_dns_zone.internal_postgresql_pagopa_it.name | ||
resource_group_name = data.azurerm_private_dns_zone.internal_postgresql_pagopa_it.resource_group_name | ||
virtual_network_id = module.vnet_italy[0].id | ||
tags = var.tags | ||
} | ||
|
||
# resource "azurerm_private_dns_zone_virtual_network_link" "dev_platform_pagopa_it_vnet_link" { | ||
# name = module.vnet_italy[0].name | ||
# private_dns_zone_name = data.azurerm_private_dns_zone.dev_platform_pagopa_it.name | ||
# resource_group_name = data.azurerm_private_dns_zone.dev_platform_pagopa_it.resource_group_name | ||
# virtual_network_id = module.vnet_italy[0].id | ||
# tags = var.tags | ||
# } | ||
|
||
resource "azurerm_private_dns_zone_virtual_network_link" "internal_dev_platform_pagopa_it_vnet_link" { | ||
name = module.vnet_italy[0].name | ||
private_dns_zone_name = data.azurerm_private_dns_zone.internal_dev_platform_pagopa_it.name | ||
resource_group_name = data.azurerm_private_dns_zone.internal_dev_platform_pagopa_it.resource_group_name | ||
virtual_network_id = module.vnet_italy[0].id | ||
tags = var.tags | ||
} | ||
|
||
resource "azurerm_private_dns_zone_virtual_network_link" "privatelink_azurecr_io_vnet_link" { | ||
name = module.vnet_italy[0].name | ||
private_dns_zone_name = data.azurerm_private_dns_zone.privatelink_azurecr_io.name | ||
resource_group_name = data.azurerm_private_dns_zone.privatelink_azurecr_io.resource_group_name | ||
virtual_network_id = module.vnet_italy[0].id | ||
tags = var.tags | ||
} | ||
|
||
resource "azurerm_private_dns_zone_virtual_network_link" "privatelink_blob_core_windows_net_vnet_link" { | ||
name = module.vnet_italy[0].name | ||
private_dns_zone_name = data.azurerm_private_dns_zone.privatelink_blob_core_windows_net.name | ||
resource_group_name = data.azurerm_private_dns_zone.privatelink_blob_core_windows_net.resource_group_name | ||
virtual_network_id = module.vnet_italy[0].id | ||
tags = var.tags | ||
} | ||
|
||
resource "azurerm_private_dns_zone_virtual_network_link" "privatelink_datafactory_azure_net_vnet_link" { | ||
name = module.vnet_italy[0].name | ||
private_dns_zone_name = data.azurerm_private_dns_zone.privatelink_datafactory_azure_net.name | ||
resource_group_name = data.azurerm_private_dns_zone.privatelink_datafactory_azure_net.resource_group_name | ||
virtual_network_id = module.vnet_italy[0].id | ||
tags = var.tags | ||
} | ||
|
||
resource "azurerm_private_dns_zone_virtual_network_link" "privatelink_documents_azure_com_vnet_link" { | ||
name = module.vnet_italy[0].name | ||
private_dns_zone_name = data.azurerm_private_dns_zone.privatelink_documents_azure_com.name | ||
resource_group_name = data.azurerm_private_dns_zone.privatelink_documents_azure_com.resource_group_name | ||
virtual_network_id = module.vnet_italy[0].id | ||
tags = var.tags | ||
} | ||
|
||
resource "azurerm_private_dns_zone_virtual_network_link" "privatelink_mongo_cosmos_azure_com_vnet_link" { | ||
name = module.vnet_italy[0].name | ||
private_dns_zone_name = data.azurerm_private_dns_zone.privatelink_mongo_cosmos_azure_com.name | ||
resource_group_name = data.azurerm_private_dns_zone.privatelink_mongo_cosmos_azure_com.resource_group_name | ||
virtual_network_id = module.vnet_italy[0].id | ||
tags = var.tags | ||
} | ||
|
||
resource "azurerm_private_dns_zone_virtual_network_link" "privatelink_queue_core_windows_net_vnet_link" { | ||
name = module.vnet_italy[0].name | ||
private_dns_zone_name = data.azurerm_private_dns_zone.privatelink_queue_core_windows_net.name | ||
resource_group_name = data.azurerm_private_dns_zone.privatelink_queue_core_windows_net.resource_group_name | ||
virtual_network_id = module.vnet_italy[0].id | ||
tags = var.tags | ||
} | ||
|
||
resource "azurerm_private_dns_zone_virtual_network_link" "privatelink_redis_cache_windows_net_vnet_link" { | ||
name = module.vnet_italy[0].name | ||
private_dns_zone_name = data.azurerm_private_dns_zone.privatelink_redis_cache_windows_net.name | ||
resource_group_name = data.azurerm_private_dns_zone.privatelink_redis_cache_windows_net.resource_group_name | ||
virtual_network_id = module.vnet_italy[0].id | ||
tags = var.tags | ||
} | ||
|
||
resource "azurerm_private_dns_zone_virtual_network_link" "privatelink_servicebus_windows_net_vnet_link" { | ||
name = module.vnet_italy[0].name | ||
private_dns_zone_name = data.azurerm_private_dns_zone.privatelink_servicebus_windows_net.name | ||
resource_group_name = data.azurerm_private_dns_zone.privatelink_servicebus_windows_net.resource_group_name | ||
virtual_network_id = module.vnet_italy[0].id | ||
tags = var.tags | ||
} | ||
|
||
resource "azurerm_private_dns_zone_virtual_network_link" "privatelink_table_core_windows_net_vnet_link" { | ||
name = module.vnet_italy[0].name | ||
private_dns_zone_name = data.azurerm_private_dns_zone.privatelink_table_core_windows_net.name | ||
resource_group_name = data.azurerm_private_dns_zone.privatelink_table_core_windows_net.resource_group_name | ||
virtual_network_id = module.vnet_italy[0].id | ||
tags = var.tags | ||
} | ||
|
||
resource "azurerm_private_dns_zone_virtual_network_link" "privatelink_table_cosmos_azure_com_vnet_link" { | ||
name = module.vnet_italy[0].name | ||
private_dns_zone_name = data.azurerm_private_dns_zone.privatelink_table_cosmos_azure_com.name | ||
resource_group_name = data.azurerm_private_dns_zone.privatelink_table_cosmos_azure_com.resource_group_name | ||
virtual_network_id = module.vnet_italy[0].id | ||
tags = var.tags | ||
} |
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
### 🔮 Italy DNS private 👉 <prod|uat|dev>.platform.pagopa.it | ||
resource "azurerm_private_dns_zone" "italy_platform_private_dns_zone" { | ||
name = "${var.platform_dns_zone_prefix}.${var.external_domain}" | ||
resource_group_name = azurerm_resource_group.rg_ita_vnet.name | ||
|
||
tags = var.tags | ||
} | ||
|
||
resource "azurerm_private_dns_zone_virtual_network_link" "dev_platform_pagopa_it_vnet_core_link" { | ||
name = module.vnet_italy[0].name | ||
private_dns_zone_name = azurerm_private_dns_zone.italy_platform_private_dns_zone.name | ||
resource_group_name = azurerm_private_dns_zone.italy_platform_private_dns_zone.resource_group_name | ||
virtual_network_id = module.vnet_italy[0].id | ||
tags = var.tags | ||
} | ||
|
||
# | ||
# RECORDS | ||
# | ||
resource "azurerm_private_dns_a_record" "platform_dns_a_private_apim" { | ||
|
||
for_each = toset(["api", "portal", "management"]) | ||
name = each.key | ||
zone_name = azurerm_private_dns_zone.italy_platform_private_dns_zone.name | ||
resource_group_name = azurerm_private_dns_zone.italy_platform_private_dns_zone.resource_group_name | ||
ttl = var.dns_default_ttl_sec | ||
records = [data.azurerm_application_gateway.app_gw_integration.frontend_ip_configuration[1].private_ip_address] | ||
tags = var.tags | ||
} | ||
|
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.