Skip to content

Commit

Permalink
update headers and adjust examples on 🚆
Browse files Browse the repository at this point in the history
  • Loading branch information
jtracey93 committed Jun 25, 2024
1 parent 7fac68d commit a8b8709
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 35 deletions.
14 changes: 4 additions & 10 deletions _header.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 2 additions & 0 deletions examples/default/_header.md
Original file line number Diff line number Diff line change
@@ -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.
14 changes: 3 additions & 11 deletions examples/default/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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

}
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions examples/with-vnet-link-existing-rg/_header.md
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -79,5 +69,5 @@ module "test" {
}
}

enable_telemetry = false
enable_telemetry = var.enable_telemetry
}
File renamed without changes.
3 changes: 0 additions & 3 deletions examples/with-vnet-link/_header.md

This file was deleted.

0 comments on commit a8b8709

Please sign in to comment.