-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import JSON Templates #468
Merged
Merged
Conversation
This file contains 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
This prototype is able to take all the expected outputs (from the tests) and generate the Template() from them. Not all objects are used in those expected templates, so there are likely some features missing still.
It is not possible to validate against AWSHelperFn such as Ref, so this typecheck is superfluous. Changing to basestring.
Thanks! |
webratz
pushed a commit
to webratz/troposphere
that referenced
this pull request
May 4, 2016
* cloudtools/master: (80 commits) Add test for AWS::Logs::Destination (cloudtools#482) Fix baseclass for AWS::Logs::Destination (Fixes cloudtools#481) Update for changes since 1.5.0 Fix Bucket AccessControl to allow Ref (cloudtools#475) Better AWSHelperFn support in template generator (cloudtools#473) Implement LifecycleRule Transitions property (cloudtools#472) Update to Apr 25, 2016 release (cloudtools#471) Fix Source object to take a list of SourceDetails (cloudtools#469) Update Contribute Document to Use Requirements.txt (cloudtools#470) Add WAF SizeConstraintSet and XssMatchSet Add backward compatibility for the deprecated ElasticsearchDomain Fix Elasticsarch Domain object naming Import JSON Templates (cloudtools#468) ReplicationConfigurationRules Destination is now an object (cloudtools#380) Remove unnecessary AWSHelperFn from props EC2 update FromPort, ToPort and Egress as optional Added CloudWatch Events support ApiGateway Resources (cloudtools#466) Provide Valid Lambda Function Memory Values for use in Parameters (cloudtools#449) move Groups to property, add policy template version (cloudtools#460) ...
amosshapira
pushed a commit
to amosshapira/troposphere
that referenced
this pull request
Oct 24, 2016
This new Template subclass makes it possible to import most Cloudformation templates as JSON and parse them as Troposphere objects. This is different from cfn2py in that it's not trying to write actual python code, but rather instantiate the actual objects without the need to edit it afterwards. There are probably a few tropo-specific AWSHelperFns that won't be parsed correctly, but the ones included in the tests/examples_output are all supported. I believe an effort should be done to normalize the helper functions into something discoverable with a consistent use - but I have yet to really ponder on that issue.
markpeek
pushed a commit
that referenced
this pull request
Dec 26, 2016
The use of dictionary comprehension in #468 caused support for Python 2.6 to be dropped. This change converts these comprehensions to use simple iteration.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This new Template subclass makes it possible to import most Cloudformation templates as JSON and parse them as Troposphere objects. This is different from cfn2py in that it's not trying to write actual python code, but rather instantiate the actual objects without the need to edit it afterwards.
There are probably a few tropo-specific AWSHelperFns that won't be parsed correctly, but the ones included in the tests/examples_output are all supported. I believe an effort should be done to normalize the helper functions into something discoverable with a consistent use - but I have yet to really ponder on that issue.