View createUiDefinition-existing-subnet.json
This file contains 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
{ | |
"$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", | |
"handler": "Microsoft.Azure.CreateUIDef", | |
"version": "0.1.2-preview", | |
"parameters": { | |
"basics": [ | |
{ | |
"name": "vnetSelector", | |
"type": "Microsoft.Solutions.ResourceSelector", | |
"label": "Virtual Network", |
View main.json
This file contains 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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"metadata": { | |
"_generator": { | |
"name": "bicep", | |
"version": "0.4.451.19169", | |
"templateHash": "16656980055364544710" | |
} | |
}, |
View gist:09c395015e9486c75ddb2f45dc5028b0
This file contains 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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"type": { | |
"type": "string", | |
"defaultValue": "Microsoft.Network/publicIPAddresses" | |
} | |
}, | |
"resources": [ |
View Invoke-RESTDeployment.ps1
This file contains 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
<# | |
.Synopsis | |
This script will deploy an Azure Resource Manager Template using the "az rest" command to invoke the REST api directly | |
.Description | |
This script will deploy an Azure Resource Manager Template using the "az rest" command to invoke the REST api directly. | |
It deploys at resourceGroup scope but can be easily modified for any scope of deployment. | |
The current account context must already be selected before executing the script, use 'az account show' to show the context | |
#> |
View Get-ProviderApiVersion.psm1
This file contains 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
function api { | |
<# | |
.Synopsis | |
Get the api versions and locations for a resource type. | |
.Description | |
Lists all the available api versions and locations for a given resource type. Information is pulled from the /providers api | |
which returns the information in the manifest published to ARM. | |
.Notes | |
The resource parameter requires the format of Namespace/type, e.g. Microsoft.Storage/storageAccounts | |
> api Microsoft.Storage/storageAccounts |
View remove-deployments-jobs.ps1
This file contains 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
# | |
#this script will delete deployments from a resourceGroup if the number of deployments exceeds the number specified by the Max parameter | |
# | |
Param( | |
[string] [Parameter(Mandatory = $true)] $ResourceGroupName, | |
[int] [Parameter(Mandatory = $true)] $Max, | |
[string] [Parameter(Mandatory = $true)] $tenantId, | |
[string] [Parameter(Mandatory = $true)] $ServicePrincipalId, | |
[securestring] [Parameter(Mandatory = $true)] $ServicePrincipalSecret, |
View Get-DeploymentCount.ps1
This file contains 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
# use this script to get all the deployments in all subscriptions the current user context has access to - it can | |
# be useful to find groups that are close to the 800 limit | |
param( | |
[int]$deploymentCountWarningLevel = 700 # number of deployments where a warning should be written | |
) | |
Disable-AzContextAutosave -Verbose | |
$subs = Get-AzSubscription |
View remove-deployments.ps1
This file contains 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
# | |
#this script will delete deployments from a resourceGroup if the number of deployments exceeds the number specified by the Max parameter | |
# | |
Param( | |
[string] [Parameter(Mandatory=$true)] $ResourceGroupName, | |
[int] [Parameter(Mandatory=$true)] $Max | |
) | |
$deployments = Get-AzureRmResourceGroupDeployment -ResourceGroupName $ResourceGroupName |
View copy-md-blob.ps1
This file contains 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 | |
( | |
[string]$sourceBlobUri, | |
[String]$StorageAccountName, | |
[string]$StorageAccountResourceGroupLocation, | |
[String]$StorageContainerName = 'vhds', | |
[String]$BlobName = 'marketplace.vhd' | |
) | |
#get Dest Storage context |
View Verify-DeploymentGuid.ps1
This file contains 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( | |
[string][Parameter(Mandatory=$true)]$deploymentName, # the full name of the deployment, e.g. pid-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | |
[string][Parameter(Mandatory=$true)]$resourceGroupName | |
) | |
# Get the correlationId of the named deployment | |
$correlationId = (Get-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName -Name "$deploymentName").correlationId | |
# Find all deployments with that correlationId | |
$deployments = Get-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName | Where-Object{$_.correlationId -eq $correlationId} |
NewerOlder