pulumi-awsx
pulumi-awsx copied to clipboard
Change policyArns in RoleWithPolicyArgs to accept eventual types
Previously the policyArns attribute in RoleWithPolicyArgs only accepted plain types as inputs. This forced users to use workarounds like using apply in order to configure policies created in the same pulumi program.
This PR changes the policyArns attribute from a plain string array to an nested Input array (Input<Input<string>[]>) to allow users to pass the whole list as well as individual elements as eventual types.
Fixes https://github.com/pulumi/pulumi-awsx/issues/1197
@t0yv0 You're absolutely correct about the breaking changes. I had started a thread about this on the original issue after I noticed it (sorry for not updating the PR yet!): https://github.com/pulumi/pulumi-awsx/issues/1197#issuecomment-2075380330
I'm thinking about adding a new parameter and deprecating the old one, do you have any other ideas to add this quality of life improvement without causing pain for other users?
Since examples/tests aren't changing looks like this may not be under test yet, would it be possible to add a quick end-to-end example using this?
Re: slightly breaking changes like this, I need a reminder CC @mjeffryes on what our breaking change policy is here. It sounds like change is not breaking for TypeScript which may account for most of the user base. I agree with you that if we're strict on breaking changes then a new added property is a good alternative.
Since examples/tests aren't changing looks like this may not be under test yet, would it be possible to add a quick end-to-end example using this?
Yes for sure!
We're planning this for the next major version upgrade. Closing the PR for now, we can pick it up again once we're working on the next major version