Guest User

Untitled

a guest
Oct 17th, 2014
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.99 KB | None | 0 0
  1. {
  2.   "heat_template_version": "2013-05-23",
  3.   "Description" : "Native Heat AWS Resource Provisioning",
  4.   "Parameters" : {
  5.          "KeyName" : {
  6.             "Type" : "string"
  7.         },
  8.          "Image" : {
  9.             "Type" : "string"
  10.         },
  11.          "NetworkId" : {
  12.             "Type" : "string"
  13.         }
  14.   },
  15.  
  16.  
  17.   "Resources" : {
  18.     "snet1" : {
  19.       "Type" : "AWS::EC2::Subnet",
  20.       "Properties" : {
  21.         "CidrBlock" :"192.168.11.0/24",
  22.         "VpcId" : { "Ref":"NetworkId" }
  23.       }
  24.     },
  25.     "instance_security_grp_0" : {
  26.       "Type" : "AWS::EC2::SecurityGroup",
  27.       "Properties" : {
  28.         "GroupDescription" :"Enable SSH access via port 22",
  29.         "SecurityGroupIngress" : [
  30.            {
  31.  
  32.               "IpProtocol" : "tcp",
  33.               "ToPort" : "22",
  34.               "FromPort" : "22",
  35.               "CidrIp" : "0.0.0.0/0"
  36.            }
  37.         ]
  38.       }
  39.     },
  40.     "instance_0" : {
  41.       "Type" : "AWS::EC2::Instance",
  42.       "Properties" : {
  43.         "ImageId" : { "Ref":"Image" },
  44.         "KeyName" : { "Ref":"KeyName" },
  45.         "InstanceType" :"m1.small",
  46.         "NetworkInterfaces" : [
  47.               {"Ref" : "nic1"}
  48.         ],
  49.         "SecurityGroups" : [
  50.               {"Ref" : "instance_security_grp_0"}
  51.         ]
  52.       }
  53.     },
  54.     "nic1_EIP" : {
  55.         "Type" : "AWS::EC2::EIP",
  56.         "Properties" : {
  57.            "Domain" : "vpc"
  58.         }
  59.      },
  60.      "nic1_EIPAssociation" : {
  61.         "Type" : "AWS::EC2::EIPAssociation",
  62.         "Properties" : {
  63.             "AllocationId" : { "Fn::GetAtt" : [ "nic1_EIP", "AllocationId" ]},
  64.             "NetworkInterfaceId" : { "Ref" : "nic1" }
  65.          }
  66.     },
  67.     "nic1" : {
  68.       "Type" : "AWS::EC2::NetworkInterface",
  69.       "Properties" : {
  70.         "GroupSet" :[{"Ref" : "instance_security_grp_0"}],
  71.         "SubnetId" : { "Ref":"snet1" }
  72.       }
  73.     }
  74.   },
  75.  
  76.   "Outputs" : {
  77.       "PublicIP" : {
  78.                 "Value" : {"get_attr":["instance_0","PublicIp"]}
  79.       }
  80.   }
  81. }
Advertisement
Add Comment
Please, Sign In to add comment