1. Deploy-ManagementGroups #2
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
name: 1. Deploy-ManagementGroups | |
on: [workflow_dispatch] | |
env: | |
ManagementGroupPrefix: "IslandHealth" | |
TopLevelManagementGroupDisplayName: "IslandHealth" | |
Location: "canadacentral" | |
# LoggingSubId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | |
# LoggingResourceGroupName: "alz-logging" | |
# HubNetworkSubId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | |
# HubNetworkResourceGroupName: "Hub_Networking_POC" | |
# RoleAssignmentManagementGroupId: "alz-platform" | |
# SpokeNetworkSubId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | |
# SpokeNetworkResourceGroupName: "Spoke_Networking_POC" | |
runNumber: ${{ github.run_number }} | |
jobs: | |
bicep_tenant_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Azure Login | |
uses: azure/login@v2 | |
with: | |
creds: '${{ secrets.AZURE_CREDENTIALS }}' | |
- name: Az CLI Deploy Management Groups | |
id: create_mgs | |
shell: bash | |
run: | | |
az deployment tenant create --template-file infra-as-code/bicep/modules/managementGroups/managementGroups.bicep --parameters @infra-as-code/bicep/modules/managementGroups/parameters/managementGroups.parameters.all.json --location ${{ env.Location }} --name create_mgs-${{ env.runNumber }} |