Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "heat_template_version": "2013-05-23",
- "Description" : "Native Heat AWS Resource Provisioning",
- "Parameters" : {
- "KeyName" : {
- "Type" : "string"
- },
- "Image" : {
- "Type" : "string"
- },
- "NetworkId" : {
- "Type" : "string"
- }
- },
- "Resources" : {
- "snet1" : {
- "Type" : "AWS::EC2::Subnet",
- "Properties" : {
- "CidrBlock" :"192.168.11.0/24",
- "VpcId" : { "Ref":"NetworkId" }
- }
- },
- "instance_security_grp_0" : {
- "Type" : "AWS::EC2::SecurityGroup",
- "Properties" : {
- "GroupDescription" :"Enable SSH access via port 22",
- "SecurityGroupIngress" : [
- {
- "IpProtocol" : "tcp",
- "ToPort" : "22",
- "FromPort" : "22",
- "CidrIp" : "0.0.0.0/0"
- }
- ]
- }
- },
- "instance_0" : {
- "Type" : "AWS::EC2::Instance",
- "Properties" : {
- "ImageId" : { "Ref":"Image" },
- "KeyName" : { "Ref":"KeyName" },
- "InstanceType" :"m1.small",
- "NetworkInterfaces" : [
- {"Ref" : "nic1"}
- ],
- "SecurityGroups" : [
- {"Ref" : "instance_security_grp_0"}
- ]
- }
- },
- "nic1_EIP" : {
- "Type" : "AWS::EC2::EIP",
- "Properties" : {
- "Domain" : "vpc"
- }
- },
- "nic1_EIPAssociation" : {
- "Type" : "AWS::EC2::EIPAssociation",
- "Properties" : {
- "AllocationId" : { "Fn::GetAtt" : [ "nic1_EIP", "AllocationId" ]},
- "NetworkInterfaceId" : { "Ref" : "nic1" }
- }
- },
- "nic1" : {
- "Type" : "AWS::EC2::NetworkInterface",
- "Properties" : {
- "GroupSet" :[{"Ref" : "instance_security_grp_0"}],
- "SubnetId" : { "Ref":"snet1" }
- }
- }
- },
- "Outputs" : {
- "PublicIP" : {
- "Value" : {"get_attr":["instance_0","PublicIp"]}
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment