https://pulumi.com logo
#general
Title
# general
b

bitter-island-28909

02/07/2019, 3:17 PM
Just a feature request: it would be nice if the filter arguments to
aws.ec2.getInstance
(and indeed all the
get*
functions) could take Inputs as well as literal values. I can work around it by calling it inside an
apply
, but it seems like it would be pretty straightforward to do that by default and keep client code cleaner.
w

white-balloon-205

02/07/2019, 9:49 PM
Yes - this is definitely a place where things feel a little less consistent around the `Input`/`Output` model - and we should think about making another change here. The original rationale for going this direction is (partly) covered here: https://github.com/pulumi/pulumi-terraform/issues/204#issuecomment-404611183 Technically these APIs don't need to track dependency information, and thus they don't have to use `Input`/`Output`. And by making them accept normal values and return
Promises
, you are technically provided more flexibility to combine these in ways that `Input`/`Output` would not support. But the resulting ergonomics for the common case are unfortunately less consistent - and the code to use them a little less "simple". So I do want to look into this again.