If someone has an example of an alternate way to n...
# google-cloud
p
If someone has an example of an alternate way to namespace their buckets using a project-derived attribute, or examples of bucket creation in general, I would appreciate a pointer in the right direction
b
hey! welcome! unfortunately your example won't work, because "computed" values can't be used for pulumi resource names
what you probably want is something like this (i haven't tested this)
Copy code
const bucket = new gcp.storage.Bucket("bucket", {
    name: project.id.apply(projectId => `${projectId}-storage`,
});
h
This is the second time this same misunderstanding has appeared in the past couple of days
p
@billowy-army-68599 Thanks for the welcome, and the snippet! I'll give it a whirl.
@hallowed-rain-9096 Guess I am not surprised to hear that; Outputs being promises under the hood was a bit of an adjustment (for me at least).
h
yeah, it's odd, but I like that it's clear how it works
i think maybe the docs for the resource names need a little help. I'm brainstorming on it. If I have some inspiration i'll propose it to the Pulumi team
p
Good to know my confusion may have contributed to a positive outcome 😄