-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support azurerm v4 and additional policy role assignments (#204)
<!-- Thank you for submitting a Pull Request. Please fill out the template below.--> ## Overview/Summary Migrate to azurerm v4 and support policy additional role assignments ## This PR fixes/adds/changes/removes N/A ### Breaking Changes Migrate to azurerm v4 and update many module references ## Testing Evidence Please provide any testing evidence to show that your Pull Request works/fixes as described and planned (include screenshots, if appropriate). ## As part of this Pull Request I have - [x] Checked for duplicate [Pull Requests](https://github.com/Azure/alz-terraform-accelerator/pulls) - [x] Associated it with relevant [issues](https://github.com/Azure/alz-terraform-accelerator/issues), for tracking and closure. - [x] Ensured my code/branch is up-to-date with the latest changes in the `main` [branch](https://github.com/Azure/alz-terraform-accelerator/tree/main) - [x] Performed testing and provided evidence. - [x] Updated relevant and associated documentation.
- Loading branch information
1 parent
af0fe6a
commit e50a779
Showing
19 changed files
with
180 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Not used in the test, but saving for reference to be able to examine the plan file | ||
|
||
$json = Get-Content .\tfplan.json -Raw | ConvertFrom-Json | ||
|
||
$resources = $json.resource_changes | Where-Object { $_.address -like 'module.management_groups.module.management_groups.azapi_resource.policy_role_assignments*' } | ||
|
||
$result = @() | ||
|
||
foreach($resource in $resources) { | ||
$body = $resource.change.after.body | ||
$roleDefinitionId = $body.properties.roleDefinitionId | ||
$parentId = $resource.change.after.parent_id | ||
|
||
if($parentId -like "/providers/Microsoft.Management/managementGroups/*") { | ||
continue | ||
} | ||
|
||
Write-Output "Role Definition ID: $roleDefinitionId" | ||
Write-Output "Parent ID: $parentId" | ||
Write-Output "----------------------" | ||
|
||
$result += [PSCustomObject]@{ | ||
RoleDefinitionId = $roleDefinitionId | ||
ParentId = $parentId | ||
} | ||
} | ||
|
||
$result | ConvertTo-Json | Out-File .\output.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,50 @@ | ||
# Azure Landing Zones Accelerator Starter Module for Terraform - Complete Multi-Region | ||
|
||
This module is part of the Azure Landing Zones Accelerator solution. It is a complete multi-region implementation of the Azure Landing Zones Platform Landing Zone for Terraform. | ||
|
||
It deploys a hub and spoke virtual network or Virtual WAN architecture across multiple regions. | ||
|
||
The module deploys the following resources: | ||
|
||
- Management group hierarchy | ||
- Azure Policy definitions and assignments | ||
- Role definitions | ||
- Management resources, including Log Analytics workspace and Automation account | ||
- Hub and spoke virtual network or Virtual WAN architecture across multiple regions | ||
- DDOS protection plan | ||
- Private DNS zones | ||
|
||
## Usage | ||
|
||
The module is intended to be used with the [Azure Landing Zones Accelerator](https://aka.ms/alz/accelerator/docs). Head over there to get started. | ||
|
||
>NOTE: The module can be used independently if needed. Example tfvars files can be found in the `examples` directory for that use case. | ||
### Running Directly | ||
|
||
#### Run the local examples | ||
|
||
Create a `terraform.tfvars` file in the root of the module directory with the following content, replacing the placeholders with the actual values: | ||
|
||
```hcl | ||
starter_locations = ["uksouth", "ukwest"] | ||
subscription_id_connectivity = "00000000-0000-0000-0000-000000000000" | ||
subscription_id_identity = "00000000-0000-0000-0000-000000000000" | ||
subscription_id_management = "00000000-0000-0000-0000-000000000000" | ||
``` | ||
|
||
##### Hub and Spoke Virtual Networks Multi Region | ||
|
||
```powershell | ||
terraform init | ||
terraform apply -var-file ./examples/config-hub-and-spoke-virtual-networks-multi-region.tfvars | ||
``` | ||
|
||
##### Virtual WAN Multi Region | ||
|
||
```powershell | ||
terraform init | ||
terraform apply -var-file ./examples/config-virtual-wan-multi-region.tfvars | ||
``` | ||
# Azure Landing Zones Accelerator Starter Module for Terraform - Complete Multi-Region | ||
|
||
DEPRECATED: This module is deprecated and will be removed in a future release. Please use the [Azure Verified Modules for Platform Landing Zone (ALZ)](https://aka.ms/alz/acc/starter/avm-plz) module as a replacement. | ||
|
||
This module is part of the Azure Landing Zones Accelerator solution. It is a complete multi-region implementation of the Azure Landing Zones Platform Landing Zone for Terraform. | ||
|
||
It deploys a hub and spoke virtual network or Virtual WAN architecture across multiple regions. | ||
|
||
The module deploys the following resources: | ||
|
||
- Management group hierarchy | ||
- Azure Policy definitions and assignments | ||
- Role definitions | ||
- Management resources, including Log Analytics workspace and Automation account | ||
- Hub and spoke virtual network or Virtual WAN architecture across multiple regions | ||
- DDOS protection plan | ||
- Private DNS zones | ||
|
||
## Usage | ||
|
||
The module is intended to be used with the [Azure Landing Zones Accelerator](https://aka.ms/alz/accelerator/docs). Head over there to get started. | ||
|
||
>NOTE: The module can be used independently if needed. Example tfvars files can be found in the `examples` directory for that use case. | ||
### Running Directly | ||
|
||
#### Run the local examples | ||
|
||
Create a `terraform.tfvars` file in the root of the module directory with the following content, replacing the placeholders with the actual values: | ||
|
||
```hcl | ||
starter_locations = ["uksouth", "ukwest"] | ||
subscription_id_connectivity = "00000000-0000-0000-0000-000000000000" | ||
subscription_id_identity = "00000000-0000-0000-0000-000000000000" | ||
subscription_id_management = "00000000-0000-0000-0000-000000000000" | ||
``` | ||
|
||
##### Hub and Spoke Virtual Networks Multi Region | ||
|
||
```powershell | ||
terraform init | ||
terraform apply -var-file ./examples/config-hub-and-spoke-virtual-networks-multi-region.tfvars | ||
``` | ||
|
||
##### Virtual WAN Multi Region | ||
|
||
```powershell | ||
terraform init | ||
terraform apply -var-file ./examples/config-virtual-wan-multi-region.tfvars | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.