Last active
April 1, 2016 02:08
-
-
Save gregjhogan/8a8fdee6f34f8cbc8959bfdd6595f98e to your computer and use it in GitHub Desktop.
Azure ARM template that dumps output variable value
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
| $template = @{ | |
| '$schema' = "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#" | |
| contentVersion = "1.0.0.0" | |
| parameters = @{} | |
| variables = @{} | |
| resources = @( | |
| ) | |
| outputs = @{ | |
| example = @{ | |
| value = "[resourceGroup()]" | |
| type = "object" | |
| } | |
| } | |
| } | |
| ConvertTo-Json -InputObject $template -Depth 1024 | Out-File -File template.json -Force | |
| $result = (New-AzureRmResourceGroupDeployment -ResourceGroupName $ResourceGroup -TemplateFile template.json) | |
| $result.Outputs.example.Value.ToString() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment