diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f0aaacec..54a28de5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ## Upcoming release +- Fix crash on `stacker diff` when comparing a template with unquoted date strings ## 1.7.2 (2020-11-09) - address breaking moto change to awslambda [GH-763] diff --git a/stacker/providers/aws/default.py b/stacker/providers/aws/default.py index c45f46119..41b3f561a 100644 --- a/stacker/providers/aws/default.py +++ b/stacker/providers/aws/default.py @@ -1136,7 +1136,7 @@ def get_stack_info(self, stack): if isinstance(template, str): # handle yaml templates template = parse_cloudformation_template(template) - return [json.dumps(template), parameters] + return [json.dumps(template, default=str), parameters] def get_stack_changes(self, stack, template, parameters, tags, **kwargs): diff --git a/stacker/tests/fixtures/cfn_template.yaml b/stacker/tests/fixtures/cfn_template.yaml index 41826a17f..dc16edd7d 100644 --- a/stacker/tests/fixtures/cfn_template.yaml +++ b/stacker/tests/fixtures/cfn_template.yaml @@ -1,4 +1,4 @@ -AWSTemplateFormatVersion: "2010-09-09" +AWSTemplateFormatVersion: 2010-09-09 Description: TestTemplate Parameters: Param1: