acceptable-army-69872
10/02/2019, 2:45 PMindex.ts(39,35): error TS2345: Argument of type '{ peerVpcId: string; filters: ({ name: string; values: string[]; } | { name: string; values: Output<string>[]; })[]; }' is not assignable to parameter of type 'GetVpcPeeringConnectionArgs'.
const peerId = remoteState.getOutput("peerId"); // export const peerId = VpcPeeringConnection.id
let doVpcPeeringRoutes = true
try {
aws.ec2.getVpcPeeringConnection({
peerVpcId: "vpc-XYZ",
filters: [
{
name: "status-code",
values: ["active"],
},
{
name: "vpc-peering-connection-id",
values: [ peerId.apply(x => `${x}`) ]
}
],
})
}
catch(x) {
doVpcPeeringRoutes = false
}
peerId.apply(x => console.log(x))
spits out the right string. so that's cool.getOutputSync
instead of getOutput, and that seems to have worked, but i'm still confused about the .apply not behaving how I'd expect.