sparse-intern-71089
08/03/2020, 2:35 PMwhite-balloon-205
Input<bool
and any code that needs to you the value will need to be inside an .apply
, that is, will only run after the value of the input becomes known. This will mean that if you need to create resources only if this is true
, the creation of those resources will not be known at preview time.
2. Otherwise, if you can accept that users of the component must know the value of this setting promptly (not eventually), then you will get an overall better experience requiring it to be a pure bool
.
Generally, we encourage (1) unless there are resources which will be created dependent on the input, in which case (2). We have talked about adding a pulumi.if
operator that would allow for something closer to (1) but still offer a great preview experience.