[api/suggestion] setters should handle `List<Output<T>>`
Open
Nobody has claimed this yet.
api/suggestion
area/languages
kind/enhancement
- Dominant language
- Java
- Stars
- 85
- Forks
- 26
- Avg merge
- 11h 49m
- Merged PRs (30d)
- 22
Description
Hello!
- Vote on this issue by adding a 👍 reaction
- If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)
Issue details
the variadic list setters should handle (List<Output<T>>) instead of having to applyValue().
I think erasure makes this ambiguous? @pawelprazak
public static Exports stack(Context ctx) {
var group = new SecurityGroup("web-sg",
SecurityGroupArgs.builder()
.description("Enable HTTP access")
.ingress(
SecurityGroupIngressArgs.builder()
.protocol("tcp")
.fromPort(80)
.toPort(80)
.cidrBlocks(List.of("0.0.0.0/0" ))
.build()
)
.build());
var server = new Instance("web-server",
InstanceArgs.builder()
.ami("ami-6869aa05")
.instanceType(Either.ofLeft("t2.micro"))
.vpcSecurityGroupIds(group.name().applyValue(name -> List.of(name))) // <=== this
.build());
ctx.export("publicIp", server.publicIp());
ctx.export("publicDns", server.publicDns());
return ctx.exports();
}
Affected area/feature
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the variadic list setters used by the vpcSecurityGroupIds example and compare them with applyValue(). Investigate how Java type erasure affects overloads involving List<Output>. Done means the intended setter API and its ambiguity constraints are resolved, with the example no longer requiring applyValue().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100