-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show warning when unknown stack-args properties are added #152
Conversation
'Template', | ||
'TimeoutInMinutes', | ||
'UsePreviousTemplate', | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any thoughts about how to ensure we keep this in sync?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type (Array<keyof StackArgs>
) should help – I wasn't able to find another instance of this list to pull it from (the StackArgs
is only a type and so the keys can't be pulled off of it).
src/cfn/index.ts
Outdated
'UsePreviousTemplate', | ||
]; | ||
|
||
const stackArgsMetaProperties = ['$imports', '$defs']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about $merge
if someone were to use that at the top level?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about that and I agree that it should be supported – I debated moving the warnings check until after transform
is called, but mistyping something like AssumeRoleARN
or Profile
could result in fetching imports to fail and it would not be obvious that the parameter name is the culprit.
I think that even though it is less helpful, it probably makes more sense to move it until after transform
.
What about just skipping anything starting with $?
…On Mon, Nov 19, 2018 at 5:37 PM James Brennan ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/cfn/index.ts
<#152 (comment)>:
> + 'OnFailure',
+ 'Parameters',
+ 'Profile',
+ 'Region',
+ 'ResourceTypes',
+ 'RoleARN',
+ 'ServiceRoleARN',
+ 'StackName',
+ 'StackPolicy',
+ 'Tags',
+ 'Template',
+ 'TimeoutInMinutes',
+ 'UsePreviousTemplate',
+];
+
+const stackArgsMetaProperties = ['$imports', '$defs'];
I thought about that and I agree that it should be supported – I debated
moving the warnings check until after transform is called, but mistyping
something like AssumeRoleARN or Profile could result in fetching imports
to fail and it would not be obvious that the parameter name is the culprit.
I think that even though it is less helpful, it probably makes more sense
to move it until after transform.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#152 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAOdVo8S3qQfcqOYsifsjIy40r6VfZdRks5uw1zjgaJpZM4YqKNc>
.
|
I ended up using Line 102 in d0e627a
transform .
|
Looks good. Merge away. Let's rebase #150 (and its dependent PRs) after. |
Good to go after rebased and conflicts resolved. |
d60c02b
to
4618aa6
Compare
Example output:
Fixes #131