Skip to content

Instantly share code, notes, and snippets.

@robzienert
Last active August 29, 2015 14:14
Show Gist options
  • Save robzienert/7b1d31b57c8df95d1952 to your computer and use it in GitHub Desktop.
Save robzienert/7b1d31b57c8df95d1952 to your computer and use it in GitHub Desktop.
from troposphere import Template
import troposphere.ec2 as ec2
import stratosphere.ext
import stratosphere.cloudformation
t = Template()
# ...
t.add_resource(ec2.Instance(
'ExampleInstance',
ImageId=stratosphere.ext.LatestUbuntuImage(
'trusty',
Type='instance-store'
),
SecurityGroups=[
Ref(some_sg),
stratosphere.cloudformation.Ref(
StackName='different-stack',
Resource='LogicalResourceId'
# or ...
Parameter='LogicalResourceId'
# or ...
Output='LogicalResourceId'
)
]
))
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment