Skip to content

Instantly share code, notes, and snippets.

@Alexhha
Created September 1, 2017 14:00
Show Gist options
  • Save Alexhha/5256986c148b514635f777c13ce537c0 to your computer and use it in GitHub Desktop.
Save Alexhha/5256986c148b514635f777c13ce537c0 to your computer and use it in GitHub Desktop.
from Cheetah.Template import Template
test = {
'VPCId': 'vpc-1234567',
'AssociatePublicIpAddress': 'false',
'EC2Subnets': 'subnet-1234567',
'ELBSubnets': 'subnet-7654321',
'SecurityGroups': 'sg-1234567',
'EC2KeyName': 'test',
'ManagedSecurityGroup': 'sg-1234567',
'ELBSecurityGroups': 'sg-1234567',
}
t = Template("""\
- Namespace: aws:ec2:vpc
OptionName: AssociatePublicIpAddress
Value: '$AssociatePublicIpAddress'
""", test)
print t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment