Azure / terraform-azurerm-avm-ptn-network-private-link-private-dns-zones

The AVM pattern module to deploy all the required private link private DNS zones for supported services.
https://registry.terraform.io/modules/Azure/avm-ptn-network-private-link-private-dns-zones/azurerm/latest
MIT License
4 stars 4 forks source link
avm azure dns private-link

terraform-azurerm-avm-ptn-network-private-link-private-dns-zones

This module deploys all known Azure Private DNS Zones for Azure Services that support Private Link as documented and detailed here in Azure Private Endpoint private DNS zone values.

The module also has logic built in to it to handle the replacements of the following strings in the Private DNS Zone Names to the appropriate Azure Region name, short name or geo-code as required:

[!NOTE]
This module only supports Azure Public/Commercial today and NOT Azure US Government Cloud (a.k.a. Fairfax) or Azure China Cloud (a.k.a. Mooncake). If you would like to see support added for these clouds please raise an issue/feature request on this repo/module.


[!IMPORTANT] As the overall AVM framework is not GA (generally available) yet - the CI framework and test automation is not fully functional and implemented across all supported languages yet - breaking changes are expected, and additional customer feedback is yet to be gathered and incorporated. Hence, modules MUST NOT be published at version 1.0.0 or higher at this time.

All module MUST be published as a pre-release version (e.g., 0.1.0, 0.1.1, 0.2.0, etc.) until the AVM framework becomes GA.

However, it is important to note that this DOES NOT mean that the modules cannot be consumed and utilized. They CAN be leveraged in all types of environments (dev, test, prod etc.). Consumers can treat them just like any other IaC module and raise issues or feature requests against them as they learn from the usage of the module. Consumers should also read the release notes for each version, if considering updating to a more recent version of a module to see if there are any considerations or breaking changes etc.

Requirements

The following requirements are needed by this module:

Resources

The following resources are used by this module:

Required Inputs

The following input variables are required:

location

Description: Azure region where the each of the Private Link Private DNS Zones created and Resource Group, if created, will be deployed.

Type: string

resource_group_name

Description: The resource group where the resources will be deployed. Either the name of the new resource group to create or the name of an existing resource group.

Type: string

Optional Inputs

The following input variables are optional (have default values):

enable_telemetry

Description: This variable controls whether or not telemetry is enabled for the module.
For more information see https://aka.ms/avm/telemetryinfo.
If it is set to false, then no telemetry will be collected.

Type: bool

Default: true

lock

Description: Controls the Resource Lock configuration for the Resource Group that hosts the Private DNS Zones. The following properties can be specified:

Type:

object({
    kind = string
    name = optional(string, null)
  })

Default: null

private_link_private_dns_zones

Description: A set of Private Link Private DNS Zones to create. Each element must be a valid DNS zone name.

NOTE:

IMPORTANT:

The folowing Private Link Private DNS Zones have been removed from the default value for this variable as they require additional placeholders to be replaced that will only be known by the caller of the module at runtime and cannot be determined by the module itself. If you have a requirement to create these Private Link Private DNS Zones, you must provide the full list of Private Link Private DNS Zones to create as a set in the private_link_private_dns_zones variable, using the default value as a reference. The list of Private Link Private DNS Zones that have been removed are:

We have also removed the following Private Link Private DNS Zones from the default value for this variable as they should only be created and used with in specific scenarios:

Type:

map(object({
    zone_name = optional(string, null)
  }))

Default:

{
  "azure_acr_data": {
    "zone_name": "{regionName}.data.privatelink.azurecr.io"
  },
  "azure_acr_registry": {
    "zone_name": "privatelink.azurecr.io"
  },
  "azure_ai_cog_svcs": {
    "zone_name": "privatelink.cognitiveservices.azure.com"
  },
  "azure_ai_oai": {
    "zone_name": "privatelink.openai.azure.com"
  },
  "azure_aks_mgmt": {
    "zone_name": "privatelink.{regionName}.azmk8s.io"
  },
  "azure_api_management": {
    "zone_name": "privatelink.azure-api.net"
  },
  "azure_app_configuration": {
    "zone_name": "privatelink.azconfig.io"
  },
  "azure_app_service": {
    "zone_name": "privatelink.azurewebsites.net"
  },
  "azure_app_service_scm": {
    "zone_name": "scm.privatelink.azurewebsites.net"
  },
  "azure_arc_guest_configuration": {
    "zone_name": "privatelink.guestconfiguration.azure.com"
  },
  "azure_arc_hybrid_compute": {
    "zone_name": "privatelink.his.arc.azure.com"
  },
  "azure_arc_kubernetes": {
    "zone_name": "privatelink.dp.kubernetesconfiguration.azure.com"
  },
  "azure_attestation": {
    "zone_name": "privatelink.attest.azure.net"
  },
  "azure_automation": {
    "zone_name": "privatelink.azure-automation.net"
  },
  "azure_avd_feed_mgmt": {
    "zone_name": "privatelink.wvd.microsoft.com"
  },
  "azure_avd_global": {
    "zone_name": "privatelink-global.wvd.microsoft.com"
  },
  "azure_backup": {
    "zone_name": "privatelink.{regionCode}.backup.windowsazure.com"
  },
  "azure_batch_account": {
    "zone_name": "{regionName}.privatelink.batch.azure.com"
  },
  "azure_batch_node_mgmt": {
    "zone_name": "{regionName}.service.privatelink.batch.azure.com"
  },
  "azure_bot_svc_bot": {
    "zone_name": "privatelink.directline.botframework.com"
  },
  "azure_bot_svc_token": {
    "zone_name": "privatelink.token.botframework.com"
  },
  "azure_cosmos_db_analytical": {
    "zone_name": "privatelink.analytics.cosmos.azure.com"
  },
  "azure_cosmos_db_cassandra": {
    "zone_name": "privatelink.cassandra.cosmos.azure.com"
  },
  "azure_cosmos_db_gremlin": {
    "zone_name": "privatelink.gremlin.cosmos.azure.com"
  },
  "azure_cosmos_db_mongo": {
    "zone_name": "privatelink.mongo.cosmos.azure.com"
  },
  "azure_cosmos_db_postgres": {
    "zone_name": "privatelink.postgres.cosmos.azure.com"
  },
  "azure_cosmos_db_sql": {
    "zone_name": "privatelink.documents.azure.com"
  },
  "azure_cosmos_db_table": {
    "zone_name": "privatelink.table.cosmos.azure.com"
  },
  "azure_data_explorer": {
    "zone_name": "privatelink.{regionName}.kusto.windows.net"
  },
  "azure_data_factory": {
    "zone_name": "privatelink.datafactory.azure.net"
  },
  "azure_data_factory_portal": {
    "zone_name": "privatelink.adf.azure.com"
  },
  "azure_data_lake_gen2": {
    "zone_name": "privatelink.dfs.core.windows.net"
  },
  "azure_databricks_ui_api": {
    "zone_name": "privatelink.azuredatabricks.net"
  },
  "azure_digital_twins": {
    "zone_name": "privatelink.digitaltwins.azure.net"
  },
  "azure_event_grid": {
    "zone_name": "privatelink.eventgrid.azure.net"
  },
  "azure_file_sync": {
    "zone_name": "privatelink.afs.azure.net"
  },
  "azure_grafana": {
    "zone_name": "privatelink.grafana.azure.com"
  },
  "azure_hdinsight": {
    "zone_name": "privatelink.azurehdinsight.net"
  },
  "azure_healthcare_dicom": {
    "zone_name": "privatelink.dicom.azurehealthcareapis.com"
  },
  "azure_healthcare_fhir": {
    "zone_name": "privatelink.fhir.azurehealthcareapis.com"
  },
  "azure_healthcare_workspaces": {
    "zone_name": "privatelink.workspace.azurehealthcareapis.com"
  },
  "azure_iot_central": {
    "zone_name": "privatelink.azureiotcentral.com"
  },
  "azure_iot_hub": {
    "zone_name": "privatelink.azure-devices.net"
  },
  "azure_iot_hub_provisioning": {
    "zone_name": "privatelink.azure-devices-provisioning.net"
  },
  "azure_iot_hub_update": {
    "zone_name": "privatelink.api.adu.microsoft.com"
  },
  "azure_key_vault": {
    "zone_name": "privatelink.vaultcore.azure.net"
  },
  "azure_log_analytics": {
    "zone_name": "privatelink.oms.opinsights.azure.com"
  },
  "azure_log_analytics_data": {
    "zone_name": "privatelink.ods.opinsights.azure.com"
  },
  "azure_managed_hsm": {
    "zone_name": "privatelink.managedhsm.azure.net"
  },
  "azure_maria_db_server": {
    "zone_name": "privatelink.mariadb.database.azure.com"
  },
  "azure_media_services_delivery": {
    "zone_name": "privatelink.media.azure.net"
  },
  "azure_migration_service": {
    "zone_name": "privatelink.prod.migration.windowsazure.com"
  },
  "azure_ml": {
    "zone_name": "privatelink.api.azureml.ms"
  },
  "azure_ml_notebooks": {
    "zone_name": "privatelink.notebooks.azure.net"
  },
  "azure_monitor": {
    "zone_name": "privatelink.monitor.azure.com"
  },
  "azure_monitor_agent": {
    "zone_name": "privatelink.agentsvc.azure-automation.net"
  },
  "azure_mysql_db_server": {
    "zone_name": "privatelink.mysql.database.azure.com"
  },
  "azure_postgres_sql_server": {
    "zone_name": "privatelink.postgres.database.azure.com"
  },
  "azure_power_bi_dedicated": {
    "zone_name": "privatelink.pbidedicated.windows.net"
  },
  "azure_power_bi_power_query": {
    "zone_name": "privatelink.tip1.powerquery.microsoft.com"
  },
  "azure_power_bi_tenant_analysis": {
    "zone_name": "privatelink.analysis.windows.net"
  },
  "azure_purview_account": {
    "zone_name": "privatelink.purview.azure.com"
  },
  "azure_purview_studio": {
    "zone_name": "privatelink.purviewstudio.azure.com"
  },
  "azure_redis_cache": {
    "zone_name": "privatelink.redis.cache.windows.net"
  },
  "azure_redis_enterprise": {
    "zone_name": "privatelink.redisenterprise.cache.azure.net"
  },
  "azure_search": {
    "zone_name": "privatelink.search.windows.net"
  },
  "azure_service_hub": {
    "zone_name": "privatelink.servicebus.windows.net"
  },
  "azure_signalr_service": {
    "zone_name": "privatelink.service.signalr.net"
  },
  "azure_site_recovery": {
    "zone_name": "privatelink.siterecovery.windowsazure.com"
  },
  "azure_sql_server": {
    "zone_name": "privatelink.database.windows.net"
  },
  "azure_static_web_apps": {
    "zone_name": "privatelink.azurestaticapps.net"
  },
  "azure_storage_blob": {
    "zone_name": "privatelink.blob.core.windows.net"
  },
  "azure_storage_file": {
    "zone_name": "privatelink.file.core.windows.net"
  },
  "azure_storage_queue": {
    "zone_name": "privatelink.queue.core.windows.net"
  },
  "azure_storage_table": {
    "zone_name": "privatelink.table.core.windows.net"
  },
  "azure_storage_web": {
    "zone_name": "privatelink.web.core.windows.net"
  }
}

resource_group_creation_enabled

Description: This variable controls whether or not the resource group should be created. If set to false, the resource group must be created elsewhere and the resource group name must be provided to the module. If set to true, the resource group will be created by the module using the name provided in resource_group_name.

Type: bool

Default: true

resource_group_role_assignments

Description: A map of role assignments to create on the Resource Group. The map key is deliberately arbitrary to avoid issues where map keys maybe unknown at plan time.

Note: only set skip_service_principal_aad_check to true if you are assigning a role to a service principal.

Type:

map(object({
    role_definition_id_or_name             = string
    principal_id                           = string
    description                            = optional(string, null)
    skip_service_principal_aad_check       = optional(bool, false)
    condition                              = optional(string, null)
    condition_version                      = optional(string, null)
    delegated_managed_identity_resource_id = optional(string, null)
  }))

Default: {}

tags

Description: (Optional) Tags of the resource.

Type: map(string)

Default: null

virtual_network_resource_ids_to_link_to

Description: A map of objects of Virtual Network Resource IDs to link to the Private Link Private DNS Zones created. The map key is deliberately arbitrary to avoid issues where map keys maybe unknown at plan time.

Type:

map(object({
    vnet_resource_id = optional(string, null)
  }))

Default: {}

Outputs

The following outputs are exported:

combined_private_link_private_dns_zones_replaced_with_vnets_to_link

Description: The final map of private link private DNS zones to link to virtual networks including the region name replacements as required.

resource_group_resource_id

Description: The resource ID of the resource group that the Private DNS Zones are deployed into.

Modules

The following Modules are called:

avm_res_network_privatednszone

Source: Azure/avm-res-network-privatednszone/azurerm

Version: 0.1.2

Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.