Skip to content

Instantly share code, notes, and snippets.

View storageprofile.json
"storageProfile": {
"imageReference": {
"publisher": "Canonical",
"offer": "UbuntuServer",
"sku": "16.04.0-LTS",
"version": "latest"
},
"osDisk": {
"name": "myOSDisk",
"createOption": "FromImage"
@marrobi
marrobi / nsg.json
Created Aug 10, 2017
ARM Network Security Group
View nsg.json
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Network/networkSecurityGroups",
"name": "VMSecurityGroup",
"location": "[resourceGroup().location]",
"tags": {
"displayName": "VMSecurityGroup"
},
"properties": {
"securityRules": [
@marrobi
marrobi / Configure-AzureWinRMHTTPS.ps1
Last active Jun 26, 2017
Configure-AzureWinRMHTTPS
View Configure-AzureWinRMHTTPS.ps1
function Configure-AzureWinRMHTTPS {
<#
.SYNOPSIS
Configure WinRM over HTTPS inside an Azure VM.
.DESCRIPTION
1. Creates a self signed certificate on the Azure VM.
2. Creates and executes a custom script extension to enable Win RM over HTTPS and opens 5986 in the Windows Firewall
3. Creates a Network Security Rules for the Network Security Group attached the the first NIC attached the the VM allowing inbound traffic on port 5986
.EXAMPLE
Configure-AzureWinRMHTTPS -ResourceGroupName "TestGroup" -VMName "TestVM"
@marrobi
marrobi / dependson.json
Created Jun 22, 2017
Depends On Nested
View dependson.json
"dependsOn": [
"[resourceId('Microsoft.Resources/deployments', 'ACR')]"
],
View acrinputs.json
"registryServer": {
"value": "[reference(resourceId('Microsoft.Resources/deployments','ACR')).outputs.registryServer.value]"
},
"registryUsername": {
"value": "[reference(resourceId('Microsoft.Resources/deployments','ACR')).outputs.registryUsername.value]"
},
"registryPassword": {
"value": "[reference(resourceId('Microsoft.Resources/deployments','ACR')).outputs.registryPassword.value]"
},
View acr.json
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"registryName": {
"type": "string",
"metadata": {
"description": "The name of the container registry."
}
},
View outputs.json
"outputs": {
"registryServer": {
"value": "[reference(resourceId('Microsoft.ContainerRegistry/registries',parameters('acrName'))).loginServer]",
"type": "string"
},
"registryUsername": {
"value": "[parameters('acrName')]",
"type": "string"
},
"registryPassword": {
View geoservervm.json
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"adminUsername": {
"type": "string",
"metadata": {
"description": "User name for the Virtual Machine."
}
},
View childresources.json
"properties":{
...stuff_exists_here
},
"resources": [
...we_will_put_our_extension_here
]
@marrobi
marrobi / geoserver.json
Created Jun 12, 2017
Azure Docker VM extension for GeoServer
View geoserver.json
{
"type": "extensions",
"name": "DockerExtension",
"tags": {
"displayName": "DockerExtension"
},
"apiVersion": "2016-03-30",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines/', variables('vmName'))]"