I'm creating a GCP storage bucket and aggregated log sink using Pulumi and Python. To create the sink I need the value of the bucket id from Pulumi.
bucket = storage.Bucket(resource_name=bucket_name,
location="us-central1",
storage_class="REGIONAL",
uniform_bucket_level_access=True)
# destination value is needed to create the logging sink.
destination = Output.all(bucket.id).apply(lambda l: f"storage.googleapis.com/{l[0]}")
print(destination)
I would expect to get a print output of the destination variable similar to "storage.googleapis.com/bucket_id"
. Instead I am getting
<pulumi.output.Output object at 0x10c39ae80>
. I've also tried using the Pulumi concat method as described at the Pulumi docs.
destination = Output.concat("storage.googleapis.com/", bucket.id)
print(destination)
This returns the same <pulumi.output.Output object at 0x10c39ae80>
instead of the expected string.
Any suggestions would be appreciated.