This file contains hidden or 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
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "Add a bastion host to an existing VPC. VPC must have an internet gateway already. **WARNING** This template creates an Amazon EC2 instance. You will be billed for the AWS resources used if you create a stack from this template.", | |
"Parameters" : { | |
"KeyName" : { | |
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances", | |
"Type" : "String", | |
"MinLength": "1", |
This file contains hidden or 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
"Outputs" : { | |
"PrivateRouteTableId" : { | |
"Value" : {"Ref" : "PrivateRouteTable"}, | |
"Description" : "Private Route Table ID" | |
} | |
} | |
} |
This file contains hidden or 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
"Resources" : { | |
"NATIPAddress" : { | |
"Type" : "AWS::EC2::EIP", | |
"Properties" : { | |
"Domain" : "vpc", | |
"InstanceId" : { "Ref" : "NATDevice" } | |
} | |
}, |
This file contains hidden or 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
"Mappings" : { | |
"AWSNATAMI": { | |
"us-east-1": {"AMI": "ami-6e9e4b06"}, | |
"us-west-2": {"AMI": "ami-8b6912bb"}, | |
"us-west-1": {"AMI": "ami-1d2b2958"}, | |
"eu-west-1": {"AMI": "ami-14913f63"}, | |
"ap-northeast-1": {"AMI": "ami-27d6e626"} | |
} | |
}, |
This file contains hidden or 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
"Parameters" : { | |
"KeyName" : { | |
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances", | |
"Type" : "String", | |
"MinLength": "1", | |
"MaxLength": "64", | |
"AllowedPattern" : "[-_ a-zA-Z0-9]*", | |
"ConstraintDescription" : "can contain only alphanumeric characters, spaces, dashes and underscores." | |
}, |
This file contains hidden or 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
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "Builds a VPC w/ INET Gateway and 3 public subnets. **WARNING** This template creates Amazon EC2 instance(s). You will be billed for the AWS resources used if you create a stack from this template.", |
This file contains hidden or 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
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "Builds a VPC w/ INET Gateway and 3 public subnets. **WARNING** This template creates Amazon EC2 instance(s). You will be billed for the AWS resources used if you create a stack from this template.", | |
"Resources" : { | |
"VPC" : { | |
"Type" : "AWS::EC2::VPC", | |
"Properties" : { |
This file contains hidden or 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 | |
Creates scheduled tasks to stop Virtual Machines. | |
.DESCRIPTION | |
Creates scheduled tasks to stop a single Virtual Machine or a set of Virtual Machines (using | |
wildcard pattern syntax for the Virtual Machine name). | |
.EXAMPLE | |
Stop-AzureVMsOnSchedule.ps1 -ServiceName "MyServiceName" -VMName "testmachine1" -TaskName "Stopt Test Machine 1" -At 5:30PM | |
Stop-AzureVMsOnSchedule.ps1 -ServiceName "MyServiceName" -VMName "test*" -TaskName "Stop All Test Machines" -At 5:30PM | |
#> |
This file contains hidden or 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 | |
Creates scheduled tasks to start Virtual Machines. | |
.DESCRIPTION | |
Creates scheduled tasks to start a single Virtual Machine or a set of Virtual Machines (using | |
wildcard pattern syntax for the Virtual Machine name). | |
.EXAMPLE | |
Start-AzureVMsOnSchedule.ps1 -ServiceName "MyServiceName" -VMName "testmachine1" ` | |
-TaskName "Start Test Machine 1" -At 8AM | |
This file contains hidden or 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
#Create a Network Security Group | |
New-AzureNetworkSecurityGroup -Name "DMZ_NSG" -Location Southeast Asia -Label "DMZ NSG SEVNET" | |
#Add, Update Rules to a NSG | |
Get-AzureNetworkSecurityGroup -Name "DMZ_NSG" | Set-AzureNetworkSecurityRule -Name RDPInternet-DMZ -Type Inbound -Priority 347 -Action Allow -SourceAddressPrefix 'INTERNET' -SourcePortRange '63389' -DestinationAddressPrefix '10.0.2.0/25' -DestinationPortRange '63389' -Protocol TCP | |
#Delete a rule from NSG | |
Get-AzureNetworkSecurityGroup -Name "DMZ_NSG" | Remove-AzureNetworkSecurityRule -Name RDPInternet-DMZ | |
#Associate a NSG to a Virtual machine |