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

busy-journalist-6936

04/15/2022, 6:48 PM
Typescript Noob question alert 🚨 lol I'm making little progress on self teaching the practical difference between type
Output<string>
and
string
. In this case, I want to do:
Copy code
const name: string = pulumi.concat(["kc2-", stack]);
But obviously that does not work due to error:
Copy code
Type 'Output<string>' is not assignable to type 'string'.
How do I remediate this?
l

little-cartoon-10569

04/18/2022, 10:13 PM
In this case, since
name
is used as an input to another Pulumi resource, the fix is as simple as
Copy code
const name: pulumi.Output<string> = pulumi.concat(["kc2-", stack]);