pulumi/sdk/dotnet/examples/bucket
Matt Ellis 66ef108516 Add Output<T>
Since resource registration is an async operation, we had been using
Task<T> to represent output properties.  Awaiting the output property
would give you the ground value of the output once the registration
completed.

However, there are cases where we may not have a known value. When
previewing, the resource provider may not be able to give back known
values for all output properties (for example, consider the case where
you are creating a new resource. In this case, the Id property is
unknown, because the resource was not created at all). To handle this
case, we introduce Output<T>. Unlike Task<T>, Output<T> tracks if the
value it represents is "known". In addition, it does not allow you to
observe the underlying value directly. Instead, there is a function
Apply which allows accessing and transforming the value. However, if
the underlying value is unknown (e.g. during preview), Apply will not
allow you to observe this state.

Note that during previews, some output properties may be present, if
the resource provider knows the update would not change them. For
example, if you run and update and then preview without changing your
code, the cloud provider will known many properties are actually
stable. This means applies may run during previews.
2018-06-22 14:23:58 -07:00
..
Program.cs Add Output<T> 2018-06-22 14:23:58 -07:00
Pulumi.hello-dotnet.yaml Remove Pulumi.Host and CSI, in favor of `dotnet run` 2018-06-21 10:50:08 -07:00
Pulumi.yaml Remove Pulumi.Host and CSI, in favor of `dotnet run` 2018-06-21 10:50:08 -07:00
bucket.csproj Remove Pulumi.Host and CSI, in favor of `dotnet run` 2018-06-21 10:50:08 -07:00