https://pulumi.com logo
#typescript
Title
# typescript
q

quiet-wolf-18467

11/09/2020, 12:11 PM
Copy code
const projectID = getProject({
    projectId: config.require("projectID"),
  }).then(project => project.id);
Why is projectID still a promise? 😂  I feel so stupid
p

prehistoric-nail-50687

11/09/2020, 2:56 PM
how about this?
Copy code
const projectID = await getProject({
    projectId: config.require("projectID"),
  }).then(project => project.id);
g

gorgeous-egg-16927

11/09/2020, 4:21 PM
Values returned from a Promise are also promises, just like values returned from Outputs are also Outputs. This is because these are eventual values, so they have to be awaited before they are known.