Skip to content

[4.x] Fix YAML parsing of existing stack templates - #447

Merged
GrahamCampbell merged 2 commits into
4.xfrom
fix-remote-template-schema-4x
Sep 6, 2026
Merged

[4.x] Fix YAML parsing of existing stack templates#447
GrahamCampbell merged 2 commits into
4.xfrom
fix-remote-template-schema-4x

Conversation

@GrahamCampbell

@GrahamCampbell GrahamCampbell commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

The deployment bucket repair path fetches an existing stack's original template and falls back to a YAML parse when it is not JSON, but that parse used js-yaml's default schema instead of the shared CloudFormation schema. Date-shaped scalars such as an IAM policy Version became Date objects and were re-submitted as ISO 8601 strings, and any template using shorthand intrinsics like !Ref failed with CLOUDFORMATION_TEMPLATE_PARSE_FAILED. This passes the shared schema at that call site, mirroring #441, and includes the underlying parse error in the message. The existing YAML repair tests now cover a shorthand tag and a date-shaped value, and a new test covers the parse failure path. #448 applies the same change to 3.x. Fixes #443.

@GrahamCampbell GrahamCampbell changed the title [4.x] Parse remote CloudFormation template with shared schema [4.x] Fix YAML parsing of existing stack templates Sep 6, 2026
@GrahamCampbell
GrahamCampbell merged commit f1d2dee into 4.x Sep 6, 2026
8 checks passed
@GrahamCampbell
GrahamCampbell deleted the fix-remote-template-schema-4x branch September 6, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remote TemplateBody is parsed without the CloudFormation schema

1 participant