fix(tags): change map types used in all tags to pulumi.Inputs of the map#157
Conversation
fd1dd79 to
6b7e908
Compare
| * The tags to apply to the CloudFormation Stack of the Worker NodeGroup. | ||
| */ | ||
| cloudFormationTags?: { [key: string]: string }; | ||
| cloudFormationTags?: pulumi.Input<{ [key: string]: string }>; |
There was a problem hiding this comment.
I suspect (but am not sure) that the usage of cloudFormationTags needs to change to support this new type.
At least the usage as written currently is highly misleading, as it does an untyped cast into a type that is no longer guaranteed to be correct.
It’s possible that it still just works because of how things get serialized before passing to the resource provider - but it might make sense to fix up the types to be correct as well.
There was a problem hiding this comment.
FWIW - I expect this is true for several of the other tag properties that have changed in this PR.
There was a problem hiding this comment.
Resolved using Pat's suggestion below
6b7e908 to
3e8efc6
Compare
|
@pgavlin Feedback has been addressed. PTAL |
12ad814 to
6ac3257
Compare
lukehoban
left a comment
There was a problem hiding this comment.
Resolved using Pat's suggestion below
I don't see any code that addresses the concern I was raising.
Code like this is no longer type-correct after this change. The ... throws away type information which hides the type mismatch, but args.nodeSecurityGroupTags is not assignable to aws.Tags. It's possible this doesn't matter, and that tags: itself allows the more general thing. But even then, the ..args.nodeSecurityGroupTags won't work as you can't splat through an Input<X>. This would need some sort of apply or Input<obj> merge function.
tags: <aws.Tags>{...args.tags, ...args.nodeSecurityGroupTags},
Relatedly - it would help to have test coverage of some of the other kinds of tags that are being changed here - since they are consumed in a quite different way. |
All the tags available are being tested in our tags example - do you see something missing that we are not testing? |
I don't see any cases that pass |
e9754d6 to
1129d99
Compare
|
@lukehoban @pgavlin Feedback has been addressed, and a new test
PTAL |
1129d99 to
59ba355
Compare
59ba355 to
da2c741
Compare
da2c741 to
11e5bc6
Compare
Fixes #146.
As showcased in the update
examples/tags/index.ts, one can now supplypulumi.Inputsof themaptypes expected for the various resource tags. For example: