Azure / terraform-azurerm-caf-enterprise-scale

Azure landing zones Terraform module
https://aka.ms/alz/tf
MIT License
864 stars 571 forks source link

virtual_network_resource_ids_to_link not working #595

Closed dani3lheidemann closed 1 year ago

dani3lheidemann commented 1 year ago

Community Note

Versions

terraform: v1.3.7

azure provider: azurerm

module: connectivity/dns

Description

Describe the bug

Hi all,

I have a brownfield environment at a customer where we currently keep some of the existing connectivity components. For this reason, I am not deploying a traditional hub or vWAN. With the parameter "virtual_network_resource_ids_to_link" I wanted to connect the new Private DNS Zones to the existing hub. Unfortunately this does not work or Terraform does not recognize this parameter. Am I doing something wrong here? These are my connectivity settings in the "settings.connectivity.tf":

# Configure custom settings for the module to deploy Virtual WAN hub
# network resources instead of traditional hub network resources.
locals {
  configure_connectivity_resources = {
    settings = {
      dns = {
        enabled = true
        config = {
          location = null
          enable_private_link_by_service = {
            azure_api_management                 = false
            azure_app_configuration_stores       = false
            azure_arc                            = false
            azure_automation_dscandhybridworker  = false
            azure_automation_webhook             = false
            azure_backup                         = false
            azure_batch_account                  = false
            azure_bot_service_bot                = false
            azure_bot_service_token              = false
            azure_cache_for_redis                = false
            azure_cache_for_redis_enterprise     = false
            azure_container_registry             = false
            azure_cosmos_db_cassandra            = false
            azure_cosmos_db_gremlin              = false
            azure_cosmos_db_mongodb              = false
            azure_cosmos_db_sql                  = false
            azure_cosmos_db_table                = false
            azure_data_explorer                  = false
            azure_data_factory                   = false
            azure_data_factory_portal            = false
            azure_data_health_data_services      = false
            azure_data_lake_file_system_gen2     = false
            azure_database_for_mariadb_server    = false
            azure_database_for_mysql_server      = false
            azure_database_for_postgresql_server = false
            azure_digital_twins                  = false
            azure_event_grid_domain              = false
            azure_event_grid_topic               = false
            azure_event_hubs_namespace           = false
            azure_file_sync                      = false
            azure_hdinsights                     = false
            azure_iot_dps                        = false
            azure_iot_hub                        = false
            azure_key_vault                      = false
            azure_key_vault_managed_hsm          = false
            azure_kubernetes_service_management  = false
            azure_machine_learning_workspace     = false
            azure_managed_disks                  = false
            azure_media_services                 = false
            azure_migrate                        = false
            azure_monitor                        = false
            azure_purview_account                = false
            azure_purview_studio                 = false
            azure_relay_namespace                = false
            azure_search_service                 = false
            azure_service_bus_namespace          = false
            azure_site_recovery                  = false
            azure_sql_database_sqlserver         = false
            azure_synapse_analytics_dev          = false
            azure_synapse_analytics_sql          = false
            azure_synapse_studio                 = false
            azure_web_apps_sites                 = false
            azure_web_apps_static_sites          = false
            cognitive_services_account           = false
            microsoft_power_bi                   = false
            signalr                              = false
            signalr_webpubsub                    = false
            storage_account_blob                 = true
            storage_account_file                 = false
            storage_account_queue                = false
            storage_account_table                = false
            storage_account_web                  = false
          }
          public_dns_zones                                       = []
          private_dns_zones                                      = []
          enable_private_dns_zone_virtual_network_link_on_hubs   = false
          enable_private_dns_zone_virtual_network_link_on_spokes = false
          virtual_network_resource_ids_to_link                   = ["/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/virtualNetworks/xxx"]
        }
      }
    }
    tags = null
    advanced = {
      custom_settings_by_resource_type = {
        azurerm_resource_group = {
          dns = {
            (local.globalconfig["location"]) = {
              name = "rg-cx-dns"
            }
          }
        }
      }
    }
  }
}

Thank you! Best Daniel

krowlandson commented 1 year ago

hi @dani3lheidemann... are you able to confirm which version of the module you are using?

This was only made available in release v3.1.0

dani3lheidemann commented 1 year ago

Hi @krowlandson, oh man, what an own goal -.- I'm using version 3.0.0. Sorry for that and thanks for the quick response.

Will close this.