sparse-intern-71089
10/03/2019, 10:04 PMearly-musician-41645
10/03/2019, 10:05 PMcool-egg-852
10/03/2019, 10:06 PMstring
to Output<string>
.cool-egg-852
10/03/2019, 10:06 PMcool-egg-852
10/03/2019, 10:06 PMcool-egg-852
10/03/2019, 10:07 PMpulumi.interpolate`${zone.name.replace(...)}`
white-balloon-205
How do I castYou unfortunately do not. AntoOutput<string>
?string
Output<string>
is a value which may not have a string available yet (it may not until the resource gets created).
So you need to use .apply
on it - and within that callback you pass to apply you will get passed the actual string value (when it's available) and can transform it into some other value. But you then need to pass the resulting Ouput<somethingelse>
to something else that accepts an Output
.
There is a fair bit of content on this topic at https://www.pulumi.com/docs/intro/concepts/programming-model/#outputs.
What does the code look like that is trying to uselet zoneId: string = zone.zoneId.apply(z => z);
zoneId
? The solution here is to change that code.early-musician-41645
10/03/2019, 10:11 PMprivate getRolePolicy(zoneId: string) {
return JSON.stringify({
Version: "2012-10-17",
Statement: [
{
Effect: "Allow",
Action: [
"route53:ChangeResourceRecordSets"
],
Resource: [
`arn:aws:route53:::hostedzone/${zoneId}`
]
},
{
Effect: "Allow",
Action: [
"route53:ListHostedZones",
"route53:ListResourceRecordSets"
],
Resource: [
"*"
]
}
]
});
}
early-musician-41645
10/03/2019, 10:11 PMearly-musician-41645
10/03/2019, 10:23 PMpulumi.all([...]).apply({...});