Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Azure/ALZ-Bicep into simpli…
Browse files Browse the repository at this point in the history
…fy-names
  • Loading branch information
oZakari committed Jul 20, 2023
2 parents 2334783 + 1e0c6b7 commit 5b6d2fa
Show file tree
Hide file tree
Showing 23 changed files with 134 additions and 30 deletions.
21 changes: 21 additions & 0 deletions accelerator/.azuredevops/pipelines/alz-bicep-1-core.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
name: ALZ-Bicep-1-Core

trigger:
# YAML PR triggers are supported only in GitHub and Bitbucket Cloud.
# If you use Azure Repos Git, you can configure a branch policy for build validation to trigger your build pipeline for validation.
# https://learn.microsoft.com/en-us/azure/devops/repos/git/branch-policies#build-validation
branches:
include:
- "main"
paths:
include:
- "config/custom-parameters/managementGroups.parameters.all.json"
- "config/custom-parameters/resourceGroupLoggingAndSentinel.parameters.all.json"
- "config/custom-parameters/logging.parameters.all.json"
- "config/custom-parameters/customPolicyDefinitions.parameters.all.json"
- "config/custom-parameters/customRoleDefinitions.parameters.all.json"
- "config/custom-parameters/mgDiagSettingsAll.parameters.all.json"
pr:
branches:
include:
- "main"
Expand All @@ -16,6 +31,7 @@ trigger:
variables:
ENV_FILE: ".env"
SERVICE_CONNECTION_NAME: "[your service connection name here]"
IS_PULL_REQUEST: "false"

jobs:
- job: ALZ_Bicep_1_Core
Expand All @@ -38,6 +54,11 @@ jobs:
}
displayName: Import Environment Variables from File
- pwsh: |
echo "##vso[task.setvariable variable=IS_PULL_REQUEST;]true"
condition: eq(variables['Build.Reason'], 'PullRequest')
displayName: Set IS_PULL_REQUEST Variable to True
- task: AzurePowerShell@5
displayName: "Management Groups Deployment"
inputs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ pr:
branches:
include:
- "main"
paths:
include:
- "config/custom-parameters/alzDefaultPolicyAssignments.parameters.all.json"
paths:
include:
- "config/custom-parameters/alzDefaultPolicyAssignments.parameters.all.json"

variables:
ENV_FILE: ".env"
SERVICE_CONNECTION_NAME: "[your service connection name here]"
IS_PULL_REQUEST: "false"

jobs:
- job: ALZ_Bicep_2_PolicyAssignments
Expand Down
12 changes: 6 additions & 6 deletions accelerator/.azuredevops/pipelines/alz-bicep-3-subplacement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ trigger:
branches:
include:
- "main"
paths:
include:
- "config/custom-parameters/subPlacementAll.parameters.all.json"
paths:
include:
- "config/custom-parameters/subPlacementAll.parameters.all.json"
pr:
branches:
include:
- "main"
paths:
include:
- "config/custom-parameters/subPlacementAll.parameters.all.json"
paths:
include:
- "config/custom-parameters/subPlacementAll.parameters.all.json"

variables:
ENV_FILE: ".env"
Expand Down
10 changes: 5 additions & 5 deletions accelerator/.azuredevops/pipelines/alz-bicep-4a-hubspoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ trigger:
paths:
include:
- "config/custom-parameters/resourceGroupConnectivity.parameters.all.json"
- "config/custom-parameters/vwanConnectivity.parameters.all.json"
- "config/custom-parameters/hubNetworking.parameters.all.json"
pr:
branches:
include:
- "main"
paths:
include:
- "config/custom-parameters/resourceGroupConnectivity.parameters.all.json"
- "config/custom-parameters/vwanConnectivity.parameters.all.json"
paths:
include:
- "config/custom-parameters/resourceGroupConnectivity.parameters.all.json"
- "config/custom-parameters/vwanConnectivity.parameters.all.json"

variables:
ENV_FILE: ".env"
Expand Down
8 changes: 4 additions & 4 deletions accelerator/.azuredevops/pipelines/alz-bicep-4b-vwan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ pr:
branches:
include:
- "main"
paths:
include:
- "config/custom-parameters/resourceGroupConnectivity.parameters.all.json"
- "config/custom-parameters/vwanConnectivity.parameters.all.json"
paths:
include:
- "config/custom-parameters/resourceGroupConnectivity.parameters.all.json"
- "config/custom-parameters/vwanConnectivity.parameters.all.json"

variables:
ENV_FILE: ".env"
Expand Down
5 changes: 5 additions & 0 deletions accelerator/.github/workflows/alz-bicep-1-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
paths:
- "config/custom-parameters/managementGroups.parameters.all.json"
- "config/custom-parameters/resourceGroupLoggingAndSentinel.parameters.all.json"
Expand All @@ -16,9 +19,11 @@ on:
permissions:
id-token: write
contents: read
pull-requests: write

env:
ENV_FILE: ".env"
IS_PULL_REQUEST: "${{ github.event_name == 'pull_request' }}"

jobs:
ALZ_Bicep_1_Core:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,21 @@ on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
paths:
- "config/custom-parameters/alzDefaultPolicyAssignments.parameters.all.json"
workflow_dispatch:

permissions:
id-token: write
contents: read
pull-requests: write

env:
ENV_FILE: ".env"
IS_PULL_REQUEST: "${{ github.event_name == 'pull_request' }}"

jobs:
ALZ_Bicep_2_PolicyAssignments:
Expand Down
5 changes: 5 additions & 0 deletions accelerator/.github/workflows/alz-bicep-3-subplacement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,21 @@ on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
paths:
- "config/custom-parameters/subPlacementAll.parameters.all.json"
workflow_dispatch:

permissions:
id-token: write
contents: read
pull-requests: write

env:
ENV_FILE: ".env"
IS_PULL_REQUEST: "${{ github.event_name == 'pull_request' }}"

jobs:
ALZ_Bicep_3_SubPlacement:
Expand Down
5 changes: 5 additions & 0 deletions accelerator/.github/workflows/alz-bicep-4a-hubspoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
paths:
- "config/custom-parameters/resourceGroupConnectivity.parameters.all.json"
- "config/custom-parameters/hubNetworking.parameters.all.json"
Expand All @@ -12,9 +15,11 @@ on:
permissions:
id-token: write
contents: read
pull-requests: write

env:
ENV_FILE: ".env"
IS_PULL_REQUEST: "${{ github.event_name == 'pull_request' }}"

jobs:
ALZ_Bicep_4a_HubSpoke:
Expand Down
5 changes: 5 additions & 0 deletions accelerator/.github/workflows/alz-bicep-4b-vwan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
paths:
- "config/custom-parameters/resourceGroupConnectivity.parameters.all.json"
- "config/custom-parameters/vwanConnectivity.parameters.all.json"
Expand All @@ -12,9 +15,11 @@ on:
permissions:
id-token: write
contents: read
pull-requests: write

env:
ENV_FILE: ".env"
IS_PULL_REQUEST: "${{ github.event_name == 'pull_request' }}"

jobs:
ALZ_Bicep_4b_VWAN:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ param (
[String]$TemplateFile = "upstream-releases\$($env:UPSTREAM_RELEASE_VERSION)\infra-as-code\bicep\modules\resourceGroup\resourceGroup.bicep",

[Parameter()]
[String]$TemplateParameterFile = "config\custom-parameters\resourceGroupConnectivity.parameters.all.json"
[String]$TemplateParameterFile = "config\custom-parameters\resourceGroupConnectivity.parameters.all.json",

[Parameter()]
[Boolean]$WhatIfEnabled = [System.Convert]::ToBoolean($($env:IS_PULL_REQUEST))
)

# Parameters necessary for deployment
Expand All @@ -18,6 +21,7 @@ $inputObject = @{
Location = $Location
TemplateFile = $TemplateFile
TemplateParameterFile = $TemplateParameterFile
WhatIf = $WhatIfEnabled
Verbose = $true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ param (
[String]$TemplateFile = "upstream-releases\$($env:UPSTREAM_RELEASE_VERSION)\infra-as-code\bicep\modules\policy\definitions\customPolicyDefinitions.bicep",

[Parameter()]
[String]$TemplateParameterFile = "config\custom-parameters\customPolicyDefinitions.parameters.all.json"
[String]$TemplateParameterFile = "config\custom-parameters\customPolicyDefinitions.parameters.all.json",

[Parameter()]
[Boolean]$WhatIfEnabled = [System.Convert]::ToBoolean($($env:IS_PULL_REQUEST))
)

# Parameters necessary for deployment
Expand All @@ -19,6 +22,7 @@ $inputObject = @{
ManagementGroupId = $TopLevelMGPrefix
TemplateFile = $TemplateFile
TemplateParameterFile = $TemplateParameterFile
WhatIf = $WhatIfEnabled
Verbose = $true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ param (
[String]$TemplateFile = "upstream-releases\$($env:UPSTREAM_RELEASE_VERSION)\infra-as-code\bicep\modules\customRoleDefinitions\customRoleDefinitions.bicep",

[Parameter()]
[String]$TemplateParameterFile = "config\custom-parameters\customRoleDefinitions.parameters.all.json"
[String]$TemplateParameterFile = "config\custom-parameters\customRoleDefinitions.parameters.all.json",

[Parameter()]
[Boolean]$WhatIfEnabled = [System.Convert]::ToBoolean($($env:IS_PULL_REQUEST))
)

# Parameters necessary for deployment
Expand All @@ -19,6 +22,7 @@ $inputObject = @{
ManagementGroupId = $TopLevelMGPrefix
TemplateFile = $TemplateFile
TemplateParameterFile = $TemplateParameterFile
WhatIf = $WhatIfEnabled
Verbose = $true
}

Expand Down
6 changes: 5 additions & 1 deletion accelerator/pipeline-scripts/Deploy-ALZHub-HubAndSpoke.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ param (
[String]$TemplateFile = "upstream-releases\$($env:UPSTREAM_RELEASE_VERSION)\infra-as-code\bicep\modules\hubNetworking\hubNetworking.bicep",

[Parameter()]
[String]$TemplateParameterFile = "config\custom-parameters\hubNetworking.parameters.all.json"
[String]$TemplateParameterFile = "config\custom-parameters\hubNetworking.parameters.all.json",

[Parameter()]
[Boolean]$WhatIfEnabled = [System.Convert]::ToBoolean($($env:IS_PULL_REQUEST))
)

# Parameters necessary for deployment
Expand All @@ -18,6 +21,7 @@ $inputObject = @{
ResourceGroupName = $ConnectivityResourceGroup
TemplateFile = $TemplateFile
TemplateParameterFile = $TemplateParameterFile
WhatIf = $WhatIfEnabled
Verbose = $true
}

Expand Down
6 changes: 5 additions & 1 deletion accelerator/pipeline-scripts/Deploy-ALZHub-VWAN.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ param (
[String]$TemplateFile = "upstream-releases\$($env:UPSTREAM_RELEASE_VERSION)\infra-as-code\bicep\modules\vwanConnectivity\vwanConnectivity.bicep",

[Parameter()]
[String]$TemplateParameterFile = "config\custom-parameters\vwanConnectivity.parameters.all.json"
[String]$TemplateParameterFile = "config\custom-parameters\vwanConnectivity.parameters.all.json",

[Parameter()]
[Boolean]$WhatIfEnabled = [System.Convert]::ToBoolean($($env:IS_PULL_REQUEST))
)

# Parameters necessary for deployment
Expand All @@ -18,6 +21,7 @@ $inputObject = @{
ResourceGroupName = $ConnectivityResourceGroup
TemplateFile = $TemplateFile
TemplateParameterFile = $TemplateParameterFile
WhatIf = $WhatIfEnabled
Verbose = $true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ param (
[String]$TemplateFile = "upstream-releases\$($env:UPSTREAM_RELEASE_VERSION)\infra-as-code\bicep\modules\logging\logging.bicep",

[Parameter()]
[String]$TemplateParameterFile = "config\custom-parameters\logging.parameters.all.json"
[String]$TemplateParameterFile = "config\custom-parameters\logging.parameters.all.json",

[Parameter()]
[Boolean]$WhatIfEnabled = [System.Convert]::ToBoolean($($env:IS_PULL_REQUEST))
)

# Parameters necessary for deployment
Expand All @@ -18,6 +21,7 @@ $inputObject = @{
ResourceGroupName = $LoggingResourceGroup
TemplateFile = $TemplateFile
TemplateParameterFile = $TemplateParameterFile
WhatIf = $WhatIfEnabled
Verbose = $true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ param (
[String]$TemplateFile = "upstream-releases\$($env:UPSTREAM_RELEASE_VERSION)\infra-as-code\bicep\modules\resourceGroup\resourceGroup.bicep",

[Parameter()]
[String]$TemplateParameterFile = "config\custom-parameters\resourceGroupLoggingAndSentinel.parameters.all.json"
[String]$TemplateParameterFile = "config\custom-parameters\resourceGroupLoggingAndSentinel.parameters.all.json",

[Parameter()]
[Boolean]$WhatIfEnabled = [System.Convert]::ToBoolean($($env:IS_PULL_REQUEST))
)

# Parameters necessary for deployment
Expand All @@ -18,6 +21,7 @@ $inputObject = @{
Location = $Location
TemplateFile = $TemplateFile
TemplateParameterFile = $TemplateParameterFile
WhatIf = $WhatIfEnabled
Verbose = $true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ param (
[String]$TemplateFile = "upstream-releases\$($env:UPSTREAM_RELEASE_VERSION)\infra-as-code\bicep\orchestration\mgDiagSettingsAll\mgDiagSettingsAll.bicep",

[Parameter()]
[String]$TemplateParameterFile = "config\custom-parameters\mgDiagSettingsAll.parameters.all.json"
[String]$TemplateParameterFile = "config\custom-parameters\mgDiagSettingsAll.parameters.all.json",

[Parameter()]
[Boolean]$WhatIfEnabled = [System.Convert]::ToBoolean($($env:IS_PULL_REQUEST))
)

# Parameters necessary for deployment
Expand All @@ -19,6 +22,7 @@ $inputObject = @{
ManagementGroupId = $TopLevelMGPrefix
TemplateFile = $TemplateFile
TemplateParameterFile = $TemplateParameterFile
WhatIf = $WhatIfEnabled
Verbose = $true
}

Expand Down
Loading

0 comments on commit 5b6d2fa

Please sign in to comment.