Created
May 4, 2018 06:42
-
-
Save lizturp/ad247b0d77154af11965c80c11a4392d to your computer and use it in GitHub Desktop.
A Cloudformation template for spinning up a bastion host to use with Qubole clusters in an AWS private subnet
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" : "2012-10-17", | |
| "Description" : "Launch EC2 Instance as a bastion host for Qubole. http://docs.qubole.com/en/latest/user-guide/clusters/clusters-in-vpcs.html.", | |
| "Parameters" : { | |
| "AccountName" : { | |
| "Description" : "For tagging purposes - example : BI Sales Department", | |
| "Type" : "String" | |
| }, | |
| "InstanceName" : { | |
| "Description" : "The Qubole account name or whatever you want to name the instance (Value will be prepended with qubole-bastion-host-(instanceNamewillgohere)", | |
| "Type" : "String" | |
| } | |
| }, | |
| "Resources" : { | |
| "EC2Instance" : { | |
| "Type" : "AWS::EC2::Instance", | |
| "Properties" : { | |
| "InstanceType" : "t2.large", | |
| "KeyName" : "keypairname", | |
| "ImageId" : "ami-2cc63b41", | |
| "AvailabilityZone" : "us-east-1b", | |
| "NetworkInterfaces": [ { | |
| "AssociatePublicIpAddress": "true", | |
| "SubnetId" : "subnet-000000", | |
| "DeviceIndex": "0", | |
| "GroupSet" : [ "sg-00000" ] | |
| }], | |
| "Tags": [ | |
| {"Key": "Name", "Value": {"Fn::Join": [ "", [ "qubole-bastion-host-", { "Ref": "InstanceName" } ] ]}}, | |
| {"Key": "Project", "Value": {"Ref": "AccountName"}}, | |
| {"Key": "Environment", "Value": "prod"}, | |
| {"Key": "Platform", "Value": "Data Services"}, | |
| {"Key": "Owner", "Value": "[email protected]"} | |
| ], | |
| } | |
| } | |
| }, | |
| "Outputs" : { | |
| "InstanceId" : { | |
| "Description" : "InstanceId of the newly created EC2 instance", | |
| "Value" : { "Ref" : "EC2Instance" } | |
| }, | |
| "PrivateIP" : { | |
| "Description" : "Private IP address of the newly created EC2 instance", | |
| "Value" : { "Fn::GetAtt" : [ "EC2Instance", "PrivateIp" ] } | |
| }, | |
| "PublicIP" : { | |
| "Description" : "Public IP address of the newly created EC2 instance", | |
| "Value" : { "Fn::GetAtt" : [ "EC2Instance", "PublicIp" ] } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment