-
Notifications
You must be signed in to change notification settings - Fork 104
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
Change policyArns in RoleWithPolicyArgs to accept eventual types #1276
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,14 +78,14 @@ public InputList<string> ManagedPolicyArns | |
public Input<string>? PermissionsBoundary { get; set; } | ||
|
||
[Input("policyArns")] | ||
private List<string>? _policyArns; | ||
private InputList<string>? _policyArns; | ||
|
||
/// <summary> | ||
/// ARNs of the policies to attach to the created role. | ||
/// </summary> | ||
public List<string> PolicyArns | ||
public InputList<string> PolicyArns | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This is breaking I think. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think dotnet has an implict conversion from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will try it out just to be sure. I was also under the impression, but better safe than sorry. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh that's true, I forgot about implicit conversions. That may be nice. |
||
{ | ||
get => _policyArns ?? (_policyArns = new List<string>()); | ||
get => _policyArns ?? (_policyArns = new InputList<string>()); | ||
set => _policyArns = value; | ||
} | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,13 +156,13 @@ public Optional<Output<String>> permissionsBoundary() { | |
* | ||
*/ | ||
@Import(name="policyArns") | ||
private @Nullable List<String> policyArns; | ||
private @Nullable Output<List<String>> policyArns; | ||
|
||
/** | ||
* @return ARNs of the policies to attach to the created role. | ||
* | ||
*/ | ||
public Optional<List<String>> policyArns() { | ||
public Optional<Output<List<String>>> policyArns() { | ||
return Optional.ofNullable(this.policyArns); | ||
} | ||
|
||
|
@@ -412,11 +412,21 @@ public Builder permissionsBoundary(String permissionsBoundary) { | |
* @return builder | ||
* | ||
*/ | ||
public Builder policyArns(@Nullable List<String> policyArns) { | ||
public Builder policyArns(@Nullable Output<List<String>> policyArns) { | ||
$.policyArns = policyArns; | ||
return this; | ||
} | ||
|
||
/** | ||
* @param policyArns ARNs of the policies to attach to the created role. | ||
* | ||
* @return builder | ||
* | ||
*/ | ||
public Builder policyArns(List<String> policyArns) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not breaking because a new overload is generated with the same sig. |
||
return policyArns(Output.of(policyArns)); | ||
} | ||
|
||
/** | ||
* @param policyArns ARNs of the policies to attach to the created role. | ||
* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -310,7 +310,7 @@ export namespace awsx { | |
/** | ||
* ARNs of the policies to attach to the created role. | ||
*/ | ||
policyArns?: string[]; | ||
policyArns?: pulumi.Input<pulumi.Input<string>[]>; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suspect TypeScript has enough magic this is not breaking. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah in typescript it is fine because Input is a type alias for |
||
/** | ||
* Key-value mapping of tags for the IAM role. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-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 there was some magic way to do this change for the SDKs while still receiving un-wrapped values in the provider but I may be mistaken. If this works it's good.
I slightly worry about provisioning resources under apply inside the component resource, but I might need some platform team help to find references to how this works.
https://www.pulumi.com/docs/concepts/resources/components/#registering-component-outputs
Normally there is a call registerOutputs at the end of the constructor.
We don't seem to be calling it for ec2TaskDefinition:
https://github.com/pulumi/pulumi-awsx/blob/master/awsx/ecs/ec2TaskDefinition.ts#L32
If we're doing apply then children may register out-of-order that is after the component resource is done constructing and I vaguely recall this may cause bugs.