Skip to content

Instantly share code, notes, and snippets.

View azuredeploy.json
{
"$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"
},
View azuredeploy.json
{
"$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 Jan 26, 2017
VNet, VMNic, VMNicPIP
View azuredeploy.json
{
"$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 Jan 26, 2017
VMSize Parameter
View vmsize.json
"VmSize": {
"type": "string",
"defaultValue": "Standard_A1",
"allowedValues": [
"Standard_A1",
"Standard_A2",
"Standard_A3",
"Standard_A4"
]
}
View EC2Instance.json
"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 Jan 26, 2017
SSHPublicKey parameter
View azuredeploy.json
"SSHPublicKey": {
"type": "securestring"
}
@marrobi
marrobi / securitygroup.json
Created Jan 26, 2017
Security Group Definition
View securitygroup.json
"InstanceSecurityGroup": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"GroupDescription": "Enable SSH access via port 22",
"SecurityGroupIngress": [
{
"IpProtocol": "tcp",
"FromPort": "22",
"ToPort": "22",
"CidrIp": { "Ref": "SSHLocation" }
View SSHLocation.json
"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 Feb 2, 2017
ARM Secuirty Group Parameter
View armsecuritygroupparam.json
"SSHLocation": {
"type": "string",
"minLength": 9,
"maxLength": 18,
"defaultValue": "0.0.0.0/0"
}
@marrobi
marrobi / armsecuritygroupssh.json
Created Jan 26, 2017
ARM Security Group with SSH
View armsecuritygroupssh.json
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Network/networkSecurityGroups",
"name": "VMSecurityGroup",
"location": "[resourceGroup().location]",
"tags": {
"displayName": "VMSecurityGroup"
},
"properties": {
"securityRules": [