I have a large sized CloudFormation template written in Yaml, I want to start using Troposphere instead. Is there any easy way to convert the CF template to Troposphere code?
I have noticed this script here https://github.com/cloudtools/troposphere/blob/master/troposphere/template_generator.py This creates a Troposphere python object, but I am not sure if its possible to output it Troposphere code.
Troposphere is a library for creating AWS CloudFormation templates. The Troposphere library allows easier creation of the AWS CloudFormation JSON by writing Python code to describe the AWS resources. Troposphere now supports setting up an Elastigroup Custom Resource.
AWS CloudFormation supports the YAML Version 1.1 specification with a few exceptions. AWS CloudFormation doesn't support the following features: The binary , omap , pairs , set , and timestamp tags.
Troposphere is an open-source project that enables Python developers to use Boto3 to generate CloudFormation code in either JSON or YAML. Many AWS customers use it.
You can do it by converting the CF YAML to JSON and running the https://github.com/cloudtools/troposphere/blob/master/scripts/cfn2py passing the JSON file in as an argument.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With