incalculable-angle-91273
01/21/2019, 7:32 PMgetOutput
method to get the values of slice from another stack. I get this error error: TypeError: subnetIds is not iterable
. But my outputs from the other stack looks like this:
▶ pulumi stack output
warning: A new version of Pulumi is available. To upgrade from version '0.0.0' to '0.16.11', visit <https://pulumi.io/install> for manual instructions and release notes.
Current stack outputs (3):
OUTPUT VALUE
subnetIds ["subnet-0b7bf0c5d120c55d6","subnet-09f0c4ca405279bfc","subnet-0db5a0bc978a313a6"]
I can get single values without problems (i.e. not lists). Does someone have an example of using getOutput
on a list?chilly-photographer-60932
01/22/2019, 6:02 PMwhite-balloon-205
x
whose value is:
{
"active": true,
"nums": [
1,
2,
3
]
}
The following program:
const s = new pulumi.StackReference("other", {
name: "bucketlistobjects",
});
const o = s.getOutput("x");
o.apply(x => console.log(x.nums[1]));
Prints 2
as expected.error: TypeError: subnetIds is not iterable
error. Which line of code is reporting that?incalculable-angle-91273
01/22/2019, 7:04 PMconsole.log
inside an apply
really helped me debug it 👍chilly-photographer-60932
01/22/2019, 8:18 PM