From 6eb6dae6712a37126a139d99301760fba0b5a13e Mon Sep 17 00:00:00 2001 From: Adam Chou Date: Tue, 2 Jul 2019 16:54:24 -0600 Subject: [PATCH] Add cfn-flip's literal option This fixes an issue with cfn-flip that incorrectly translates JSON for a step function as documented below: https://github.com/awslabs/aws-cfn-template-flip/pull/80 --- requirements-dev.txt | 2 +- requirements.txt | 2 +- troposphere/__init__.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 75f11f1cd..f6a0854ed 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,7 +2,7 @@ # ------------------------------------- # ---- Need libraries installed by setup.py -cfn_flip>=1.0.2 +cfn_flip>=1.2.1 awacs>=0.8 # ---- Documentation Libraries diff --git a/requirements.txt b/requirements.txt index 6131a2f70..9f14b04b2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,4 @@ # ------------------------------------- # ---- Need libraries installed by setup.py -cfn_flip>=1.0.2 +cfn_flip>=1.2.1 diff --git a/troposphere/__init__.py b/troposphere/__init__.py index 6f4dd4a19..616fba1b8 100644 --- a/troposphere/__init__.py +++ b/troposphere/__init__.py @@ -784,9 +784,9 @@ def to_json(self, indent=4, sort_keys=True, separators=(',', ': ')): return json.dumps(self.to_dict(), indent=indent, sort_keys=sort_keys, separators=separators) - def to_yaml(self, clean_up=False, long_form=False): + def to_yaml(self, clean_up=False, long_form=False, literal=True): return cfn_flip.to_yaml(self.to_json(), clean_up=clean_up, - long_form=long_form) + long_form=long_form, literal=literal) def __eq__(self, other): if isinstance(other, Template):