Created
November 13, 2015 10:00
-
-
Save stuartleeks/0ad6e40f7e722ad79291 to your computer and use it in GitHub Desktop.
ARM deployment operations - PowerShell, CLI
This file contains hidden or 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
param($resourceGroupName) | |
# note that this requires jq: https://stedolan.github.io/jq/download/ | |
$deploymentName=$(azure group deployment list $resourceGroupName --json | jq "[.[] | {name:.name, timestamp: .properties.timestamp } ] | sort_by(.timestamp) | reverse | .[0].name" --raw-output) | |
azure group deployment operation list --resource-group $resourceGroupName --name $deploymentName --json | jq '[.[] | .properties | { provisioningState : .provisioningState, timestamp: .timestamp, resourceType:.targetResource.resourceType,resourceName:.targetResource.resourceName}] | sort_by(.timestamp)' |
This file contains hidden or 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
param($resourceGroupName) | |
# note that this requires jq: https://stedolan.github.io/jq/download/ | |
$deploymentName=$(azure group deployment list $resourceGroupName --json | jq "[.[] | {name:.name, timestamp: .properties.timestamp } ] | sort_by(.timestamp) | reverse | .[0].name" --raw-output) | |
azure group deployment operation list --resource-group $resourceGroupName --name $deploymentName --json | jq '[.[] | .properties | { provisioningState : .provisioningState, timestamp: .timestamp, resourceType:.targetResource.resourceType,resourceName:.targetResource.resourceName}] | sort_by(.timestamp) | .[] | select(.provisioningState != \"Succeeded\")' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment