sparse-intern-71089
02/01/2023, 6:49 PMsteep-toddler-94095
02/01/2023, 7:34 PMPromise
so you can't just do string concat on it and expect it to work. Pulumi has an interpolate
function though that you can use for something like this: `interpolate`systemserviceaccountemr:emr-containers-sa---${accountId}-${jobExecutionRoleNameBase36Encoded}``bland-pharmacist-96854
02/01/2023, 7:37 PMthen
also?bland-pharmacist-96854
02/01/2023, 7:40 PMsteep-toddler-94095
02/01/2023, 7:42 PM"system:serviceaccount:emr:emr-containers-sa-*-*-" +
accountId +
"-" +
jobExecutionRoleNameBase36Encoded
bland-pharmacist-96854
02/01/2023, 7:47 PMbland-pharmacist-96854
02/01/2023, 7:50 PMpulumi.concat
orange-policeman-59119
02/02/2023, 2:39 AMconst foo = pulumi.interpolate`this text is in a template expression, the variable foo is an Output<string>, and this template can handle promises and outputs like: ${accountId}`;
The catch is that like with promises, once a value is an "Output", it stays in the world of Output<T> values forever. e.g.:
const bar = foo.apply(str => str.length());
bar
should now be an Output<number>, and it can be passed to Pulumi resources.