diff --git a/_header.md b/_header.md index 518d2f6..7c57e4e 100644 --- a/_header.md +++ b/_header.md @@ -1,15 +1,9 @@ -# terraform-azurerm-avm-template +# terraform-azurerm-avm-ptn-network-private-link-private-dns-zones -This is a template repo for Terraform Azure Verified Modules. +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](https://learn.microsoft.com/azure/private-link/private-endpoint-dns). -Things to do: - -1. Set up a GitHub repo environment called `test`. -1. Configure environment protection rule to ensure that approval is required before deploying to this environment. -1. Create a user-assigned managed identity in your test subscription. -1. Create a role assignment for the managed identity on your test subscription, use the minimum required role. -1. Configure federated identity credentials on the user assigned managed identity. Use the GitHub environment. -1. Search and update TODOs within the code and remove the TODO comments once complete. +> [!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. diff --git a/examples/default/_header.md b/examples/default/_header.md index 9eb0b85..aa2d189 100644 --- a/examples/default/_header.md +++ b/examples/default/_header.md @@ -1,3 +1,5 @@ # Default example This deploys the module in its simplest form. + +It will deploy all known Azure Private DNS Zones for Azure Services that support Private Link in a new Resource Group that it will create with the name provided. \ No newline at end of file diff --git a/examples/default/main.tf b/examples/default/main.tf index 156d822..e5af426 100644 --- a/examples/default/main.tf +++ b/examples/default/main.tf @@ -16,36 +16,28 @@ provider "azurerm" { features {} } - -## Section to provide a random Azure region for the resource group -# This allows us to randomize the region for the resource group. module "regions" { source = "Azure/regions/azurerm" version = "~> 0.3" } -# This allows us to randomize the region for the resource group. resource "random_integer" "region_index" { max = length(module.regions.regions) - 1 min = 0 } -## End of section to provide a random Azure region for the resource group -# This ensures we have unique CAF compliant names for our resources. module "naming" { source = "Azure/naming/azurerm" version = "~> 0.3" } -# This is the module call -# Do not specify location here due to the randomization above. -# Leaving location as `null` will cause the module to use the resource group location -# with a data source. + module "test" { source = "../../" # source = "Azure/avm-ptn-network-private-link-private-dns-zones/azurerm" location = module.regions.regions[random_integer.region_index.result].name resource_group_name = module.naming.resource_group.name_unique - enable_telemetry = false + enable_telemetry = var.enable_telemetry + } diff --git a/examples/with-vnet-link/README.md b/examples/with-vnet-link-existing-rg/README.md similarity index 100% rename from examples/with-vnet-link/README.md rename to examples/with-vnet-link-existing-rg/README.md diff --git a/examples/with-vnet-link/_footer.md b/examples/with-vnet-link-existing-rg/_footer.md similarity index 100% rename from examples/with-vnet-link/_footer.md rename to examples/with-vnet-link-existing-rg/_footer.md diff --git a/examples/with-vnet-link-existing-rg/_header.md b/examples/with-vnet-link-existing-rg/_header.md new file mode 100644 index 0000000..f2262de --- /dev/null +++ b/examples/with-vnet-link-existing-rg/_header.md @@ -0,0 +1,5 @@ +# Link Private DNS Zones to Virtual Networks and Deploy Private DNS Zones to an Existing Resource Group + +This deploys the in a more advanced but more common configuration. + +It will deploy all known Azure Private DNS Zones for Azure Services that support Private Link into an existing Resource Group and will also link each of the Private DNS Zones to the Virtual Networks provided via a Private DNS Zone Virtual Network Link. \ No newline at end of file diff --git a/examples/with-vnet-link/main.tf b/examples/with-vnet-link-existing-rg/main.tf similarity index 73% rename from examples/with-vnet-link/main.tf rename to examples/with-vnet-link-existing-rg/main.tf index 6b260b3..1778da6 100644 --- a/examples/with-vnet-link/main.tf +++ b/examples/with-vnet-link-existing-rg/main.tf @@ -17,27 +17,21 @@ provider "azurerm" { } -## Section to provide a random Azure region for the resource group -# This allows us to randomize the region for the resource group. module "regions" { source = "Azure/regions/azurerm" version = "~> 0.3" } -# This allows us to randomize the region for the resource group. resource "random_integer" "region_index" { max = length(module.regions.regions) - 1 min = 0 } -## End of section to provide a random Azure region for the resource group -# This ensures we have unique CAF compliant names for our resources. module "naming" { source = "Azure/naming/azurerm" version = "~> 0.3" } -# This is required for resource modules resource "azurerm_resource_group" "this" { location = module.regions.regions[random_integer.region_index.result].name name = module.naming.resource_group.name_unique @@ -57,10 +51,6 @@ resource "azurerm_virtual_network" "this_2" { address_space = ["10.0.2.0/24"] } -# This is the module call -# Do not specify location here due to the randomization above. -# Leaving location as `null` will cause the module to use the resource group location -# with a data source. module "test" { source = "../../" # source = "Azure/avm-ptn-network-private-link-private-dns-zones/azurerm" @@ -79,5 +69,5 @@ module "test" { } } - enable_telemetry = false + enable_telemetry = var.enable_telemetry } diff --git a/examples/with-vnet-link/variables.tf b/examples/with-vnet-link-existing-rg/variables.tf similarity index 100% rename from examples/with-vnet-link/variables.tf rename to examples/with-vnet-link-existing-rg/variables.tf diff --git a/examples/with-vnet-link/_header.md b/examples/with-vnet-link/_header.md deleted file mode 100644 index 9eb0b85..0000000 --- a/examples/with-vnet-link/_header.md +++ /dev/null @@ -1,3 +0,0 @@ -# Default example - -This deploys the module in its simplest form.