Is there a way to set outputs like the following? ...
# dotnet
c
Is there a way to set outputs like the following?
Copy code
using System.Collections.Generic;
using Pulumi;
using Pulumi.Aws.S3;

return await Deployment.RunAsync(async () =>
{
    var outputs = new Dictionary<string, object?>();

    var bucket = new Bucket("items", new BucketArgs { });

    bucket.Arn.Apply(arn =>
    {
        outputs.Add("arn", arn); //here
        return arn;
    });

    return outputs;
});
t
This won’t always work as Arn.Apply won’t resolve until the resource is deployed, so your outputs will be empty on the initial run
AFAIK you can return outputs as dictionary values
Copy code
outputs.Add("arn", bucket.Arn);