Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "AWSTemplateFormatVersion": "2010-09-09",
- "Parameters" : {
- "KeyPairName" : {
- "Description" : "You must have your public key on your aws - ec2 - network & security - key pairs section",
- "Type" : "String"
- }
- },
- "Resources": {
- "vpcd3adf3aa": {
- "Type": "AWS::EC2::VPC",
- "Properties": {
- "CidrBlock": "10.99.0.0/16",
- "InstanceTenancy": "default",
- "EnableDnsSupport": "true",
- "EnableDnsHostnames": "false",
- "Tags": [
- {
- "Key": "Name",
- "Value": "st-cloudformation"
- }
- ]
- }
- },
- "subnet1b9e3a50": {
- "Type": "AWS::EC2::Subnet",
- "Properties": {
- "CidrBlock": "10.99.0.0/24",
- "AvailabilityZone": "us-west-2b",
- "VpcId": {
- "Ref": "vpcd3adf3aa"
- },
- "Tags": [
- {
- "Key": "Name",
- "Value": "st-cloudformation"
- }
- ]
- }
- },
- "igw14057072": {
- "Type": "AWS::EC2::InternetGateway",
- "Properties": {
- "Tags": [
- {
- "Key": "Name",
- "Value": "st-cloudformation"
- }
- ]
- }
- },
- "doptd75f46b5": {
- "Type": "AWS::EC2::DHCPOptions",
- "Properties": {
- "DomainName": "us-west-2.compute.internal",
- "DomainNameServers": [
- "AmazonProvidedDNS"
- ]
- }
- },
- "acl80f553f8": {
- "Type": "AWS::EC2::NetworkAcl",
- "Properties": {
- "VpcId": {
- "Ref": "vpcd3adf3aa"
- },
- "Tags": [
- {
- "Key": "Name",
- "Value": "st-cloudformation"
- }
- ]
- }
- },
- "rtb41104239": {
- "Type": "AWS::EC2::RouteTable",
- "Properties": {
- "VpcId": {
- "Ref": "vpcd3adf3aa"
- },
- "Tags": [
- {
- "Key": "Name",
- "Value": "st-cloudformation-public"
- }
- ]
- }
- },
- "instancei012c21b7d8e198887": {
- "Type": "AWS::EC2::Instance",
- "Properties": {
- "DisableApiTermination": "false",
- "InstanceInitiatedShutdownBehavior": "stop",
- "ImageId": "ami-223f945a",
- "InstanceType": "t2.micro",
- "KeyName": {
- "Ref": "KeyPairName"
- },
- "Monitoring": "false",
- "Tags": [
- {
- "Key": "Name",
- "Value": "st-cloudformation"
- }
- ],
- "NetworkInterfaces": [
- {
- "DeleteOnTermination": "true",
- "Description": "Primary network interface",
- "DeviceIndex": 0,
- "SubnetId": {
- "Ref": "subnet1b9e3a50"
- },
- "PrivateIpAddresses": [
- {
- "PrivateIpAddress": "10.99.0.151",
- "Primary": "true"
- }
- ],
- "GroupSet": [
- {
- "Ref": "sgstcloudformation"
- }
- ],
- "AssociatePublicIpAddress": "true"
- }
- ]
- }
- },
- "sgstcloudformation": {
- "Type": "AWS::EC2::SecurityGroup",
- "Properties": {
- "GroupDescription": "launch-wizard-37 created 2018-04-17T19:55:21.240+08:00",
- "VpcId": {
- "Ref": "vpcd3adf3aa"
- },
- "Tags": [
- {
- "Key": "Name",
- "Value": "st-cloudformation"
- }
- ]
- }
- },
- "acl1": {
- "Type": "AWS::EC2::NetworkAclEntry",
- "Properties": {
- "CidrBlock": "0.0.0.0/0",
- "Egress": "true",
- "Protocol": "-1",
- "RuleAction": "allow",
- "RuleNumber": "100",
- "NetworkAclId": {
- "Ref": "acl80f553f8"
- }
- }
- },
- "acl2": {
- "Type": "AWS::EC2::NetworkAclEntry",
- "Properties": {
- "CidrBlock": "0.0.0.0/0",
- "Protocol": "-1",
- "RuleAction": "allow",
- "RuleNumber": "100",
- "NetworkAclId": {
- "Ref": "acl80f553f8"
- }
- }
- },
- "subnetacl1": {
- "Type": "AWS::EC2::SubnetNetworkAclAssociation",
- "Properties": {
- "NetworkAclId": {
- "Ref": "acl80f553f8"
- },
- "SubnetId": {
- "Ref": "subnet1b9e3a50"
- }
- }
- },
- "gw1": {
- "Type": "AWS::EC2::VPCGatewayAttachment",
- "Properties": {
- "VpcId": {
- "Ref": "vpcd3adf3aa"
- },
- "InternetGatewayId": {
- "Ref": "igw14057072"
- }
- }
- },
- "route1": {
- "Type": "AWS::EC2::Route",
- "Properties": {
- "DestinationCidrBlock": "0.0.0.0/0",
- "RouteTableId": {
- "Ref": "rtb41104239"
- },
- "GatewayId": {
- "Ref": "igw14057072"
- }
- },
- "DependsOn": "gw1"
- },
- "SubnetRouteTableAssociation008": {
- "Type" : "AWS::EC2::SubnetRouteTableAssociation",
- "Properties" : {
- "RouteTableId" : {
- "Ref": "rtb41104239"
- },
- "SubnetId" : {
- "Ref": "subnet1b9e3a50"
- }
- }
- },
- "dchpassoc1": {
- "Type": "AWS::EC2::VPCDHCPOptionsAssociation",
- "Properties": {
- "VpcId": {
- "Ref": "vpcd3adf3aa"
- },
- "DhcpOptionsId": {
- "Ref": "doptd75f46b5"
- }
- }
- },
- "ingress1": {
- "Type": "AWS::EC2::SecurityGroupIngress",
- "Properties": {
- "GroupId": {
- "Ref": "sgstcloudformation"
- },
- "IpProtocol": "tcp",
- "FromPort": "22",
- "ToPort": "22",
- "CidrIp": "0.0.0.0/0"
- }
- },
- "egress1": {
- "Type": "AWS::EC2::SecurityGroupEgress",
- "Properties": {
- "GroupId": {
- "Ref": "sgstcloudformation"
- },
- "IpProtocol": "-1",
- "CidrIp": "0.0.0.0/0"
- }
- }
- },
- "Description": "st-formation"
- }
Advertisement
Add Comment
Please, Sign In to add comment