Replies: 1 comment
|
What is AWS CloudFormation API doing with such a template? Would it be rejected or pass-through and then later the stack creation would fail with some error? |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Context
MiniStack’s CloudFormation path parses JSON/YAML and resolves standard intrinsic functions (
Ref,Fn::Sub, etc.). It does not evaluate tooling-specific syntax that often appears in templates before packaging, for example:${file(...)}(Serverless Framework)${self:...}(Serverless)MasonFn::...Those strings usually pass through unchanged, which can look like “MiniStack accepted the stack” even though values are not what you’d get after
serverless package,sam package, orcdk synth.Proposal (for discussion, not a firm design)
I’ve been exploring a small, opt-in layer that:
MINISTACK_CFN_FAIL_ON_CUSTOM_SYNTAX=1, returnsValidationErroron ValidateTemplate, CreateStack, UpdateStack, CreateChangeSet, and GetTemplateSummary so CI or local workflows can fail fast if someone submits an uncompiled template.Documentation would spell out: “compile first; MiniStack is not a Serverless/SAM engine.”
Questions for maintainers and users
${file(,${self:,MasonFn::) to avoid false positives, or is there a list you’d like (e.g.${AWS::, SAMAWS::Serverless::*only inTransform, etc.)?ValidateTemplateCapabilitiesReason-style messaging, with no new env var?What I’m not proposing (here)
Actually expanding
${file(...)}/${self:...}inside MiniStack (full Serverless macro engine). That’s a different project (dependencies, config roots, variable scopes, plugins).I’d love maintainer guidance on whether to pursue the “detect + document + optional strict gate” approach, adjust it, or drop it in favor of documentation only. Happy to turn consensus into a small PR once there’s alignment.
All reactions