Added What-If Controlled Rollout (#185)

* Added What-If Controlled Rollout

* updated location in ado workflow
This commit is contained in:
Marvin Buss 2021-10-06 09:25:15 +02:00 коммит произвёл GitHub
Родитель 1f806ed50d
Коммит 6254bb7256
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 47 добавлений и 1 удалений

Просмотреть файл

@ -22,7 +22,7 @@ pr:
variables:
AZURE_RESOURCE_MANAGER_CONNECTION_NAME: "data-management-zone-service-connection" # Update to '{yourResourceManagerConnectionName}'
AZURE_SUBSCRIPTION_ID: "17588eb2-2943-461a-ab3f-00a3ceac3112" # Update to '{yourDataManagementZoneSubscriptionId}'
AZURE_LOCATION: "North Europe" # Update to '{yourRegionName}'
AZURE_LOCATION: "northeurope" # Update to '{yourRegionName}'
stages:
- stage: Validation
@ -61,6 +61,34 @@ stages:
csmParametersFile: "$(System.DefaultWorkingDirectory)/infra/params.dev.json"
deploymentMode: "Validation"
# Deploy Data Management Zone - what-if
- task: AzureCLI@2
name: data_management_zone_whatif
displayName: Deploy Data Management Zone - what-if
enabled: true
continueOnError: false
inputs:
azureSubscription: ${{ variables.AZURE_RESOURCE_MANAGER_CONNECTION_NAME }}
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
az account set `
--subscription ${{ variables.AZURE_SUBSCRIPTION_ID }}
az deployment sub what-if `
--location ${{ variables.AZURE_LOCATION }} `
--subscription ${{ variables.AZURE_SUBSCRIPTION_ID }} `
--exclude-change-types Ignore NoChange Unsupported `
--template-file "$(System.DefaultWorkingDirectory)/infra/main.json" `
--parameters "$(System.DefaultWorkingDirectory)/infra/params.dev.json" `
--result-format "FullResourcePayloads"
powerShellErrorActionPreference: "stop"
addSpnToEnvironment: false
useGlobalConfig: false
failOnStandardError: false
powerShellIgnoreLASTEXITCODE: false
- stage: Deployment
displayName: "Deployment of IaC templates"
dependsOn: Validation

Просмотреть файл

@ -51,6 +51,24 @@ jobs:
deploymentMode: Validate
failOnStdErr: false
# Deploy Data Management Zone - what-if
- name: Deploy Data Management Zone - what-if
id: data_management_zone_whatif
uses: azure/CLI@v1
with:
azcliversion: "latest"
inlineScript: |
az account set \
--subscription ${{ env.AZURE_SUBSCRIPTION_ID }}
az deployment sub what-if \
--location ${{ env.AZURE_LOCATION }} \
--subscription ${{ env.AZURE_SUBSCRIPTION_ID }} \
--exclude-change-types Ignore NoChange Unsupported \
--template-file "${GITHUB_WORKSPACE}/infra/main.json" \
--parameters "${GITHUB_WORKSPACE}/infra/params.dev.json" \
--result-format "FullResourcePayloads"
# Log out from Azure
- name: Log out from Azure
id: azure_logout