Skip to content

Commit

Permalink
Update option formats
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredfholgate committed Jan 8, 2025
1 parent 5c73941 commit 596b421
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ You can choose to not deploy a Bastion Host. In order to do that, they need to r

The steps to follow are:

1. To keep the code tidy remove the follow settings from `custom_replacements.names`:
* `<region>_bastion_host_name` where `<region>` is for each region
* `<region>_bastion_public_ip_name` where `<region>` is for each region
* `<region>_bastion_subnet_address_prefix` where `<region>` is for each region
1. Remove the whole `bastion` section from each `hub_and_spoke_vnet_virtual_networks` or `virtual_wan_virtual_hubs` region
1. Delete the following settings by searching for the keys and removing the line or block

| Setting Type | Parent block(s) | Key | Action | Count | Notes |
| - | - | - | - | - | - |
| line | `custom_replacements` > `names` | `<region>_bastion_host_name` | Delete | 1+ | `<region>` is the relevant region (e.g. `primary` or `secondary`) |
| line | `custom_replacements` > `names` | `<region>_bastion_public_ip_name` | Delete | 1+ | `<region>` is the relevant region (e.g. `primary` or `secondary`) |
| line | `custom_replacements` > `names` | `<region>_bastion_subnet_address_prefix` | Delete | 1+ | `<region>` is the relevant region (e.g. `primary` or `secondary`) |
| block | `hub_and_spoke_vnet_virtual_networks` OR `virtual_wan_virtual_hubs` | `bastion` | Delete | 1+ | There will be two instances for a multi-region deployment |
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@ You can choose to not deploy any DNS related resources. In order to do that, the

The steps to follow are:

1. To keep the code tidy remove the follow settings from `custom_replacements.names`:
* `dns_resource_group_name`
* `<region>_private_dns_resolver_name` where `<region>` is for each region
* `<region>_auto_registration_zone_name` where `<region>` is for each region
* `<region>_private_dns_resolver_subnet_address_prefix` where `<region>` is for each region
1. Remove the following configuration settings from `management_group_settings.policy_default_values`:
* `private_dns_zone_subscription_id`
* `private_dns_zone_region`
* `private_dns_zone_resource_group_name`
1. Add the follow section to `management_group_settings.policy_assignments_to_modify`:
1. Delete the following settings by searching for the keys and removing the line or block

| Setting Type | Parent block(s) | Key | Action | Count | Notes |
| - | - | - | - | - | - |
| line | `custom_replacements` > `names` | `dns_resource_group_name` | Delete | 1 | |
| line | `custom_replacements` > `names` | `<region>_private_dns_resolver_name` | Delete | 1+ | `<region>` is the relevant region (e.g. `primary` or `secondary`) |
| line | `custom_replacements` > `names` | `<region>_auto_registration_zone_name` | Delete | 1+ | `<region>` is the relevant region (e.g. `primary` or `secondary`) |
| line | `custom_replacements` > `names` | `<region>_private_dns_resolver_subnet_address_prefix` | Delete | 1+ | `<region>` is the relevant region (e.g. `primary` or `secondary`) |
| line | `management_group_settings` > `policy_default_values` | `private_dns_zone_subscription_id` | Delete | 1 | |
| line | `management_group_settings` > `policy_default_values` | `private_dns_zone_region` | Delete | 1 | |
| line | `management_group_settings` > `policy_default_values` | `private_dns_zone_resource_group_name` | Delete | 1 | |
| block | `hub_and_spoke_vnet_virtual_networks` OR `virtual_wan_virtual_hubs` | `private_dns_zones` | Delete | 1+ | There will be two instances for a multi-region deployment |

1. Add the follow configuration to the `management_group_settings` > `policy_assignments_to_modify` block setting

```terraform
corp = {
Expand All @@ -28,5 +32,3 @@ The steps to follow are:
}
}
```
1. Remove the whole `private_dns_zones` section from each `hub_and_spoke_vnet_virtual_networks` or `virtual_wan_virtual_hubs` region
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,37 @@ You can choose to not deploy any Virtual Network Gateways. In order to do that,

The steps to follow are:

1. To keep the code tidy remove the following settings from `custom_replacements.names`:
* `<region>_virtual_network_gateway_express_route_name` where `<region>` is for each region
* `<region>_virtual_network_gateway_express_route_public_ip_name` where `<region>` is for each region
* `<region>_virtual_network_gateway_vpn_name` where `<region>` is for each region
* `<region>_virtual_network_gateway_vpn_public_ip_name` where `<region>` is for each region
* `<region>_gateway_subnet_address_prefix` where `<region>` is for each region
1. Remove the whole `virtual_network_gateways` section from each `hub_and_spoke_vnet_virtual_networks` or `virtual_wan_virtual_hubs` region
1. Delete the following settings by searching for the keys and removing the line or block

| Setting Type | Parent block(s) | Key | Action | Count | Notes |
| - | - | - | - | - | - |
| line | `custom_replacements` > `names` | `<region>_virtual_network_gateway_express_route_name` | Delete | 1+ | `<region>` is the relevant region (e.g. `primary` or `secondary`) |
| line | `custom_replacements` > `names` | `<region>_virtual_network_gateway_express_route_public_ip_name` | Delete | 1+ | `<region>` is the relevant region (e.g. `primary` or `secondary`) |
| line | `custom_replacements` > `names` | `<region>_virtual_network_gateway_vpn_name` | Delete | 1+ | `<region>` is the relevant region (e.g. `primary` or `secondary`) |
| line | `custom_replacements` > `names` | `<region>_virtual_network_gateway_vpn_public_ip_name` | Delete | 1+ | `<region>` is the relevant region (e.g. `primary` or `secondary`) |
| line | `custom_replacements` > `names` | `<region>_gateway_subnet_address_prefix` | Delete | 1+ | `<region>` is the relevant region (e.g. `primary` or `secondary`) |
| block | `hub_and_spoke_vnet_virtual_networks` OR `virtual_wan_virtual_hubs` | `virtual_network_gateways` | Delete | 1+ | There will be two instances for a multi-region deployment |

## For ExpressRoute Virtual Network Gateways only

The steps to follow are:

1. To keep the code tidy remove the following settings from `custom_replacements.names`:
* `<region>_virtual_network_gateway_express_route_name` where `<region>` is for each region
* `<region>_virtual_network_gateway_express_route_public_ip_name` where `<region>` is for each region
1. Remove the whole `express_route` section from the `virtual_network_gateways` section in each `hub_and_spoke_vnet_virtual_networks` or `virtual_wan_virtual_hubs` region
1. Delete the following settings by searching for the keys and removing the line or block

| Setting Type | Parent block(s) | Key | Action | Count | Notes |
| - | - | - | - | - | - |
| line | `custom_replacements` > `names` | `<region>_virtual_network_gateway_express_route_name` | Delete | 1+ | `<region>` is the relevant region (e.g. `primary` or `secondary`) |
| line | `custom_replacements` > `names` | `<region>_virtual_network_gateway_express_route_public_ip_name` | Delete | 1+ | `<region>` is the relevant region (e.g. `primary` or `secondary`) |
| block | `hub_and_spoke_vnet_virtual_networks` > `virtual_network_gateways` OR `virtual_wan_virtual_hubs` > `virtual_network_gateways` | `express_route` | Delete | 1+ | There will be two instances for a multi-region deployment |

## For VPN Virtual Network Gateways only

The steps to follow are:

1. To keep the code tidy remove the following settings from `custom_replacements.names`:
* `<region>_virtual_network_gateway_vpn_name` where `<region>` is for each region
* `<region>_virtual_network_gateway_vpn_public_ip_name` where `<region>` is for each region
1. Remove the whole `vpn` section from the `virtual_network_gateways` section in each `hub_and_spoke_vnet_virtual_networks` or `virtual_wan_virtual_hubs` region
1. Delete the following settings by searching for the keys and removing the line or block

| Setting Type | Parent block(s) | Key | Action | Count | Notes |
| - | - | - | - | - | - |
| line | `custom_replacements` > `names` | `<region>_virtual_network_gateway_vpn_name` | Delete | 1+ | `<region>` is the relevant region (e.g. `primary` or `secondary`) |
| line | `custom_replacements` > `names` | `<region>_virtual_network_gateway_vpn_public_ip_name` | Delete | 1+ | `<region>` is the relevant region (e.g. `primary` or `secondary`) |
| block | `hub_and_spoke_vnet_virtual_networks` > `virtual_network_gateways` OR `virtual_wan_virtual_hubs` > `virtual_network_gateways` | `vpn` | Delete | 1+ | There will be two instances for a multi-region deployment |
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,64 @@ Additional regions are supported. The custom can add up to 10 regions using the
If you need to scale beyond 10 regions, that can be accommodated by adding additional built in replacements [here](https://github.com/Azure/alz-terraform-accelerator/blob/cf0b37351cd4f2dde9d2cf20642d76bacadf923c/templates/platform_landing_zone/locals.config.tf#L2)
{{< /hint >}}

To add an additional regions, the process is `copy` -> `paste` -> `update`:
To add an additional regions, the process is `copy` -> `paste` -> `update`.

1. Copy, paste and update the regional resource group names in `custom_replacements.names`
1. Copy, paste and update the regional resource names in `custom_replacements.names`
1. Copy, paste and update the regional private dns zone names in `custom_replacements.names`
1. Copy, paste and update the regional IP Ranges in `custom_replacements.names`
1. Copy, paste and update the regional resource group in `connectivity_resource_groups`
1. Copy, paste and update the region in `hub_and_spoke_vnet_virtual_networks` or `virtual_wan_virtual_hubs`
The settings are slightly different depending on the chosen networking type:

For example, to add a third region you would copy, paste, update, replacing `starter_location_02` with `starter_location_03`.
## Hub and Spoke Virtual Network

1. Find, copy, paste and update the following settings by searching for the keys and copying the line or block.

| Setting Type | Parent block(s) | Key | Action | Count | Notes |
| - | - | - | - | - | - |
| line | `custom_replacements` > `names` | `connectivity_hub_<region>_resource_group_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_virtual_network_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_firewall_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_firewall_policy_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_firewall_public_ip_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_route_table_firewall_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_route_table_user_subnets_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_virtual_network_gateway_express_route_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_virtual_network_gateway_express_route_public_ip_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_virtual_network_gateway_vpn_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_virtual_network_gateway_vpn_public_ip_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_private_dns_resolver_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_bastion_host_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_bastion_host_public_ip_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_auto_registration_zone_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_hub_address_space` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_hub_virtual_network_address_space` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_firewall_subnet_address_prefix` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_bastion_subnet_address_prefix` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_gateway_subnet_address_prefix` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_private_dns_resolver_subnet_address_prefix` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| block | `connectivity_resource_groups` | `vnet_<region>` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| block | `hub_and_spoke_vnet_virtual_networks` | `<region>` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |

For example, to add a third region you would copy and paste all the `primary` configuration. Then replace the `<region>` `primary` with `tertiary` and `starter_location_01` with `starter_location_03`.

## Virtual WAN

1. Find, copy, paste and update the following settings by searching for the keys and copying the line or block.

| Setting Type | Parent block(s) | Key | Action | Count | Notes |
| - | - | - | - | - | - |
| line | `custom_replacements` > `names` | `connectivity_hub_<region>_resource_group_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_hub_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_sidecar_virtual_network_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_firewall_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_firewall_policy_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_virtual_network_gateway_express_route_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_virtual_network_gateway_vpn_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_private_dns_resolver_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_bastion_host_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_bastion_host_public_ip_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_auto_registration_zone_name` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_hub_address_space` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_side_car_virtual_network_address_space` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_bastion_subnet_address_prefix` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| line | `custom_replacements` > `names` | `<region>_private_dns_resolver_subnet_address_prefix` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| block | `connectivity_resource_groups` | `vwan_hub_<region>` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |
| block | `virtual_wan_virtual_hubs` | `<region>` | Copy, Paste, and Update | 1 | `<region>` is the relevant region (e.g. `primary`) |

For example, to add a third region you would copy and paste all the `primary` configuration. Then replace the `<region>` `primary` with `tertiary` and `starter_location_01` with `starter_location_03`.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ weight: 1

Custom resource names are support for all resources. You can customize the resource names by updating the configuration file.

In our example configuration file, you will find all the resource names in the `custom_replacements.names` section.
In our example configuration file, you will find all the resource names in the `custom_replacements` > `names` block setting.

To update them, you can simply change the value of the resource name in that section.

Expand Down

0 comments on commit 596b421

Please sign in to comment.