This Overlay Terraform Module creates an Azure Private DNS Zone to be linked with an Azure Virutal Network and manage related parameters to be used in a SCCA compliant Network.
Since this module is built for both public and us government clouds. The environment variable defaults to public for Azure Cloud. When using this module with the Azure Government Cloud, you must set the environment variable to usgovernment. You will also need to set the azurerm provider environment variable to the proper cloud as well. This will ensure that the correct Azure Government Cloud endpoints are used. You will also need to set the location variable to a valid Azure Government Cloud location.
Example Usage for Azure Government Cloud:
provider "azurerm" {
environment = "usgovernment"
}
module "mod_ampls" {
source = "POps-Rox/tf-az-overlays-private-dns-zone/azurerm"
version = "x.x.x"
location = "usgovvirginia"
environment = "usgovernment"
...
}
This module can be SCCA compliant and can be used in a SCCA compliant Network. Enable private endpoints and SCCA compliant network rules to make it SCCA compliant.
For more information, please read the SCCA documentation.
If you want to contribute to this repository, feel free to to contribute to our Terraform module.
More details are available in the CONTRIBUTING.md file.
This Terraform module is open-sourced software licensed under the MIT License.
| Name | Type |
|---|---|
| azurerm_private_dns_zone.private_dns_zone | resource |
| azurerm_private_dns_zone_virtual_network_link.private_dns_zone_vnet_links | resource |
| popsrox_resource_name.private_dns_zone | data source |
| azurerm_client_config.current | data source |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
module "mod_vng" {
source = "POps-Rox/tf-az-overlays-private-dns-zone/azurerm"
version = "x.x.x"
# Resource Group, location, VNet and Subnet details
location = var.location
deploy_environment = var.deploy_environment
environment = var.environment
org_name = var.org_name
workload_name = var.workload_name
private_dns_zone_name = "privatelink.database.windows.net"
existing_resource_group_name = module.dns-network-rg.resource_group_name
private_dns_zone_vnets_ids = [
azurerm_virtual_network.dns-vnet.id
]
# Tags
add_tags = {} # Tags to be applied to all resources
}
| Name | Version |
|---|---|
| terraform | >= 1.3 |
| popsrox-utils | ~> 1.0.4 |
| azurerm | ~> 3.22 |
| Name | Version |
|---|---|
| popsrox-utils | ~> 1.0.4 |
| azurerm | ~> 3.22 |
| Name | Source | Version |
|---|---|---|
| mod_azregions | POps-Rox/overlays-azregions-lookup/azurerm | ~> 1.0.0 |
| Name | Type |
|---|---|
| azurerm_private_dns_zone.private_dns_zone | resource |
| azurerm_private_dns_zone_virtual_network_link.private_dns_zone_vnet_links | resource |
| popsrox_resource_name.private_dns_zone | data source |
| azurerm_client_config.current | data source |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| add_tags | Map of custom tags. | map(string) |
{} |
no |
| custom_private_dns_zone_name | The name of the custom dns zone name to create. If not set, the name will be generated using the org_name, workload_name, deploy_environment and environment variables. |
string |
null |
no |
| default_tags_enabled | Option to enable or disable default tags. | bool |
true |
no |
| deploy_environment | Name of the workload's environnement | string |
n/a | yes |
| environment | The Terraform backend environment e.g. public or usgovernment | string |
n/a | yes |
| existing_resource_group_name | The name of the existing resource group to use to add the dns zone into. | string |
null |
no |
| is_not_private_link_service | Boolean to determine if this module is used for Private Link Service or not. | bool |
true |
no |
| location | Azure region in which instance will be hosted | string |
n/a | yes |
| name_prefix | Optional prefix for the generated name | string |
"" |
no |
| name_suffix | Optional suffix for the generated name | string |
"" |
no |
| org_name | Name of the organization | string |
n/a | yes |
| private_dns_zone_name | Private DNS Zone name. | string |
n/a | yes |
| private_dns_zone_vnets_ids | IDs of the VNets to link to the Private DNS Zone. | list(string) |
n/a | yes |
| soa_record_private_dns | Customize details about the root block device of the instance. See Block Devices below for details. | list(object({})) |
[] |
no |
| use_location_short_name | Use short location name for resources naming (ie eastus -> eus). Default is true. If set to false, the full cli location name will be used. if custom naming is set, this variable will be ignored. | bool |
true |
no |
| use_naming | Use the Azure NoOps naming provider to generate default resource name. storage_account_custom_name override this if set. Legacy default name is used if this is set to false. |
bool |
true |
no |
| vm_autoregistration_enabled | Is auto-registration of VM records in the VNet in the Private DNS zone enabled? Defaults to false. |
bool |
false |
no |
| workload_name | Name of the workload_name | string |
n/a | yes |
| Name | Description |
|---|---|
| private_dns_zone_id | Private DNS Zone ID. |
| private_dns_zone_name | Private DNS Zone name. |
| private_dns_zone_vnet_links_ids | VNet links IDs. |