Skip to content

Commit 1d2c61b

Browse files
committed
Fix formatting
1 parent 42e460a commit 1d2c61b

5 files changed

Lines changed: 29 additions & 14 deletions

File tree

alz/azuredevops/locals.files.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ locals {
22
agent_pool_configuration = var.use_self_hosted_agents ? "name: ${local.resource_names.version_control_system_agent_pool}" : "vmImage: ubuntu-latest"
33
repository_name_templates = var.use_separate_repository_for_templates ? local.resource_names.version_control_system_repository_templates : local.resource_names.version_control_system_repository
44

5-
is_bicep_iac_type = var.iac_type == "bicep" || var.iac_type == "bicep-avm"
6-
is_classic_bicep = var.iac_type == "bicep"
7-
is_bicep_avm = var.iac_type == "bicep-avm"
8-
iac_type_for_pipelines = var.iac_type # Use actual iac_type for pipeline directory
5+
is_bicep_iac_type = var.iac_type == "bicep" || var.iac_type == "bicep-avm"
6+
is_classic_bicep = var.iac_type == "bicep"
7+
is_bicep_avm = var.iac_type == "bicep-avm"
8+
iac_type_for_pipelines = var.iac_type # Use actual iac_type for pipeline directory
99

1010
pipeline_files_directory_path = "${path.module}/pipelines/${local.iac_type_for_pipelines}/main"
1111
pipeline_template_files_directory_path = "${path.module}/pipelines/${local.iac_type_for_pipelines}/templates"

alz/azuredevops/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ variable "custom_role_definitions_bicep" {
576576
description = "This is a custom role created by the Azure Landing Zones Accelerator for Writing in platform subscriptions."
577577
permissions = {
578578
actions = [
579-
"*"
579+
"*"
580580
]
581581
not_actions = []
582582
}

alz/github/actions/bicep-avm/templates/actions/bicep-avm-first-deployment-check/action.yaml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,31 @@ runs:
1515
with:
1616
azPSVersion: 'latest'
1717
inlineScript: |
18-
$managementGroupId = $env:MANAGEMENT_GROUP_ID
18+
# Read the int-root management group name from the bicepparam file
19+
$intRootParamFile = "templates/core/governance/mgmt-groups/int-root/main.bicepparam"
20+
if (Test-Path $intRootParamFile) {
21+
$paramContent = Get-Content $intRootParamFile -Raw
22+
if ($paramContent -match 'managementGroupName:\s*[''"](\w+)[''"]+') {
23+
$intRootMgId = $matches[1]
24+
Write-Host "Found int-root management group name in param file: $intRootMgId"
25+
} else {
26+
Write-Warning "Could not parse managementGroupName from $intRootParamFile, using default 'alz'"
27+
$intRootMgId = "alz"
28+
}
29+
} else {
30+
Write-Warning "Int-root param file not found at $intRootParamFile, using default 'alz'"
31+
$intRootMgId = "alz"
32+
}
33+
1934
$managementGroups = Get-AzManagementGroup
20-
$managementGroup = $managementGroups | Where-Object { $_.Name -eq $managementGroupId }
35+
$intRootMg = $managementGroups | Where-Object { $_.Name -eq $intRootMgId }
2136
2237
$firstDeployment = $true
2338
24-
if($managementGroup -eq $null) {
25-
Write-Warning "Cannot find the $managementGroupId Management Group, so assuming this is the first deployment. We must skip checking some deployments since their dependent resources do not exist yet."
39+
if($intRootMg -eq $null) {
40+
Write-Warning "Cannot find the $intRootMgId Management Group, so assuming this is the first deployment. We must skip checking some deployments since their dependent resources do not exist yet."
2641
} else {
27-
Write-Host "Found the $managementGroupId Management Group, so assuming this is not the first deployment."
42+
Write-Host "Found the $intRootMgId Management Group, so assuming this is not the first deployment."
2843
$firstDeployment = $false
2944
}
3045
echo "firstDeployment=$firstDeployment" >> $env:GITHUB_ENV

alz/github/locals.files.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ locals {
55
is_bicep_iac_type = contains(["bicep", "bicep-avm"], var.iac_type)
66
is_classic_bicep = var.iac_type == "bicep"
77
is_bicep_avm = var.iac_type == "bicep-avm"
8-
iac_type_for_pipelines = var.iac_type # Use actual iac_type for pipeline directory
8+
iac_type_for_pipelines = var.iac_type # Use actual iac_type for pipeline directory
99
}
1010

1111
locals {

alz/local/locals.files.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
locals {
22
deploy_script_folder_path = local.is_bicep_avm ? "${path.module}/scripts-bicep-avm" : "${path.module}/scripts"
3-
is_bicep_iac_type = contains(["bicep", "bicep-avm"], var.iac_type)
4-
is_classic_bicep = var.iac_type == "bicep"
5-
is_bicep_avm = var.iac_type == "bicep-avm"
3+
is_bicep_iac_type = contains(["bicep", "bicep-avm"], var.iac_type)
4+
is_classic_bicep = var.iac_type == "bicep"
5+
is_bicep_avm = var.iac_type == "bicep-avm"
66
}
77

88
locals {

0 commit comments

Comments
 (0)