Skip to content

Commit

Permalink
Added What-If Controlled Rollout (#185)
Browse files Browse the repository at this point in the history
* Added What-If Controlled Rollout

* updated location in ado workflow
  • Loading branch information
marvinbuss authored Oct 6, 2021
1 parent 1f806ed commit 6254bb7
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .ado/workflows/dataManagementZoneDeployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/dataManagementZoneDeployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6254bb7

Please sign in to comment.