hi, I'm all new to `pulumi` and I have a question ...
# typescript
r
hi, I'm all new to
pulumi
and I have a question about javascript usage:
Copy code
// 1.
const image = new docker.Image(...) // promise ?

// 2.
const service = new gcp.cloudrun.Service(, { // promise too
  ...
  image: image.imageName,
  ...
})
I guess 1.
new docker.Image
returns a promise, but how 2.
await
for it ?
b
it’s not really a promise, it’s an
Output
which is promise like Why do you want to await it?
r
no I'm just trying to figure out the flow of instructions
v
you should just be able to pass image.name through to the service args, as inputs/outputs are interchangeable as far as i understand it
r
I guess this is the answer to my "flow" question:
Pulumi automatically captures dependencies when you pass an output from one resource as an input to another resource.
https://www.pulumi.com/docs/intro/concepts/inputs-outputs/#:~:text=pulumi%20automatically%20captures%20dependencies%20when%20you%20pass%20an%20output%20from%20one%20resource%20as%20an%20input%20to%20another%20resource.
I'm sure there are reasons for this, but I would have really preferred avoiding this type of magic, and handle this with classical promises/await
b
@ripe-cat-40820 the reason for this is that primises are not a thing in our other supported languages
and we support more languages than javascript
a lot of the semantics are the same, but it’s declarative