cloudtools / troposphere

troposphere - Python library to create AWS CloudFormation descriptions
BSD 2-Clause "Simplified" License
4.93k stars 1.45k forks source link

Question: template to troposphere source? #53

Open john-aws opened 10 years ago

john-aws commented 10 years ago

Hi, nice work! This is not an issue, just a question: is there a template to troposphere source tool (the inverse of troposphere)?

I notice that the troposphere examples are all converted from CloudFormation templates hosted by AWS at http://aws.amazon.com/cloudformation/aws-cloudformation-templates/. Did you guys write that source code manually, or do you have a tool that parses existing templates and produces (as far as possible) the equivalent troposphere source code? That might also be a useful tool (and even better might be a Python script that could be launched on an instance within a VPC that describes the entire VPC and spits out troposphere source, like AWS CloudFormer already does but with the extra step to produce troposphere source). Thanks for all the hard work.

markpeek commented 10 years ago

There is a cfn2py script available but it has some limitations and I have some designs for a rewrite that should do a better job. But yes, the early examples have been hand generated from the templates.

Generating a troposphere script from a VPC is an interesting idea. You don't really need it to run within a VPC in order to get the data but it might take a bit to get the breadth of options correct. I'll have to think about that a bit.

john-aws commented 10 years ago

Thanks, appreciate the quick reply.

bedge commented 10 years ago

+1 on the cfn2py refresh. If you could pass all the aws cfn sample templates through this it would be a great starting point for new adopters.

amosshapira commented 8 years ago

There is AWS CloudFormer: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-using-cloudformer.html I used it to describe a manually setup VPC as a CFN Template which I could then convert into a Troposphere script.