Skip to content

Instantly share code, notes, and snippets.

{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
},
"variables": {
"VNetPrefix": "10.0.0.0/16",
"VNetSubnet1Name": "Subnet-1",
"VNetSubnet1Prefix": "10.0.0.0/24"
},
@marrobi
marrobi / azuredeploy.json
Created January 26, 2017 12:49
VNet, VMNic
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"VMNicName": {
"type": "string",
"minLength": 1
}
},
"variables": {
@marrobi
marrobi / azuredeploy.json
Created January 26, 2017 13:19
VNet, VMNic, VMNicPIP
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"VMNicName": {
"type": "string",
"minLength": 1
},
"VMNicPIPDnsName": {
"type": "string",
@marrobi
marrobi / vmsize.json
Last active January 26, 2017 14:10
VMSize Parameter
"VmSize": {
"type": "string",
"defaultValue": "Standard_A1",
"allowedValues": [
"Standard_A1",
"Standard_A2",
"Standard_A3",
"Standard_A4"
]
}
@marrobi
marrobi / EC2Instance.json
Created January 26, 2017 14:22
EC2 Instance
"EC2Instance": {
"Type": "AWS::EC2::Instance",
"Properties": {
"InstanceType": { "Ref": "InstanceType" },
"SecurityGroups": [ { "Ref": "InstanceSecurityGroup" } ],
"KeyName": { "Ref": "KeyName" },
"ImageId": {
"Fn::FindInMap": [
"AWSRegionArch2AMI",
{ "Ref": "AWS::Region" },
@marrobi
marrobi / azuredeploy.json
Created January 26, 2017 16:50
SSHPublicKey parameter
"SSHPublicKey": {
"type": "securestring"
}
@marrobi
marrobi / securitygroup.json
Created January 26, 2017 17:42
Security Group Definition
"InstanceSecurityGroup": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"GroupDescription": "Enable SSH access via port 22",
"SecurityGroupIngress": [
{
"IpProtocol": "tcp",
"FromPort": "22",
"ToPort": "22",
"CidrIp": { "Ref": "SSHLocation" }
@marrobi
marrobi / SSHLocation.json
Created January 26, 2017 17:49
SSHLocation
"SSHLocation": {
"Description": "The IP address range that can be used to SSH to the EC2 instances",
"Type": "String",
"MinLength": "9",
"MaxLength": "18",
"Default": "0.0.0.0/0",
"AllowedPattern": "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2})",
"ConstraintDescription": "must be a valid IP CIDR range of the form x.x.x.x/x."
}
@marrobi
marrobi / armsecuritygroupparam.json
Last active February 2, 2017 16:03
ARM Secuirty Group Parameter
"SSHLocation": {
"type": "string",
"minLength": 9,
"maxLength": 18,
"defaultValue": "0.0.0.0/0"
}
@marrobi
marrobi / armsecuritygroupssh.json
Created January 26, 2017 18:39
ARM Security Group with SSH
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Network/networkSecurityGroups",
"name": "VMSecurityGroup",
"location": "[resourceGroup().location]",
"tags": {
"displayName": "VMSecurityGroup"
},
"properties": {
"securityRules": [