Skip to content

Instantly share code, notes, and snippets.

View justinyoo's full-sized avatar

Justin Yoo justinyoo

View GitHub Profile
@justinyoo
justinyoo / Get-AzureRmProviderOperation.ps1
Created January 4, 2018 11:37
List of Access Keys from Output Values after ARM Template Deployment
Get-AzureRmProviderOperation -OperationSearchString "Microsoft.Storage/*" `
| Where-Object { $_.Operation -like "*list*" } `
| Format-Table Operation
@justinyoo
justinyoo / Invoke-AzureRmResourceAction.ps1
Created January 4, 2018 11:38
List of Access Keys from Output Values after ARM Template Deployment
Invoke-AzureRmResourceAction `
-ResourceGroupName "RESOURCE_GROUP_NAME" `
-ResourceType "Microsoft.Storage/storageAccounts" `
-ResourceName "STORAGE_ACCOUNT_NAME" `
-Action listKeys `
-Force
@justinyoo
justinyoo / StorageAccounts.json
Created January 4, 2018 11:59
List of Access Keys from Output Values after ARM Template Deployment
{
"variables": {
"storageAccount": {
"name": "my-storage-account"
},
"resourceId": "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccount').name)]",
"apiVersion": "[providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]]"
},
"resources": [],
"outputs": {
@justinyoo
justinyoo / Get-AzureRmProviderOperation.ps1
Created January 4, 2018 12:00
List of Access Keys from Output Values after ARM Template Deployment
Get-AzureRmProviderOperation -OperationSearchString "Microsoft.Web/*" `
| Where-Object { $_.Operation -like "*function*list*" } `
| Format-Table Operation
@justinyoo
justinyoo / Invoke-AzureRmResourceAction.ps1
Last active January 4, 2018 12:09
List of Access Keys from Output Values after ARM Template Deployment
$apiVersion = `
((Get-AzureRmResourceProvider `
-ProviderNamespace "Microsoft.Web").ResourceTypes `
| Where-Object { $_.ResourceTypeName -eq "sites" }).ApiVersions[0]
Invoke-AzureRmResourceAction `
-ApiVersion $apiVersion `
-ResourceGroupName "RESOURCE_GROUP_NAME" `
-ResourceType "Microsoft.Web/sites/functions" `
-ResourceName "FUNCTION_APP_NAME/FUNCTION_NAME" `
@justinyoo
justinyoo / FunctionApp.json
Created January 4, 2018 12:06
List of Access Keys from Output Values after ARM Template Deployment
{
"variables": {
"functionApp": {
"name": "my-function-app",
"functionName": "my-function"
},
"resourceId": "[resourceId('Microsoft.Web/sites/functions', variables('functionApp').name, variables('functionApp').functionName)]",
"apiVersion": "[providers('Microsoft.Web', 'sites').apiVersions[0]]"
},
"resources": [],
@justinyoo
justinyoo / Get-AzureRmProviderOperation.ps1
Created January 4, 2018 12:07
List of Access Keys from Output Values after ARM Template Deployment
Get-AzureRmProviderOperation -OperationSearchString "Microsoft.Logic/*" `
| Where-Object { $_.Operation -like "*trigger*list*" } `
| Format-Table Operation
@justinyoo
justinyoo / Invoke-AzureRmResourceAction.ps1
Created January 4, 2018 12:09
List of Access Keys from Output Values after ARM Template Deployment
$apiVersion = `
((Get-AzureRmResourceProvider `
-ProviderNamespace "Microsoft.Logic").ResourceTypes `
| Where-Object { $_.ResourceTypeName -eq "workflows" }).ApiVersions[0]
Invoke-AzureRmResourceAction `
-ApiVersion $apiVersion `
-ResourceGroupName "RESOURCE_GROUP_NAME" `
-ResourceType "Microsoft.Logic/workflows/triggers" `
-ResourceName "RESOURCE_NAME/manual" `
@justinyoo
justinyoo / LogicApp.json
Last active July 4, 2022 08:53
List of Access Keys from Output Values after ARM Template Deployment
{
"variables": {
"logicApp": {
"name": "my-logic-app",
"trigger": "manual"
},
"resourceId": "[resourceId('Microsoft.Logic/workflows/triggers', variables('logicApp').name, variables('logicApp').trigger)]",
"apiVersion": "[providers('Microsoft.Logic', 'workflows').apiVersions[0]]"
},
"resources": [],
@justinyoo
justinyoo / LogicApp.json
Created January 21, 2018 11:30
Testing ARM Templates with Pester
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"logicAppName1": {
"type": "string",
"metadata": {
"description": "First part of the Logic App."
}
},