sparse-intern-71089
03/19/2020, 6:04 PMwhite-balloon-205
white-balloon-205
green-morning-1318
03/19/2020, 6:08 PMwhite-balloon-205
green-morning-1318
03/19/2020, 6:24 PMc := make(chan string)
gw.ID().ToStringOutput().ApplyString(func(id string) string {
c <- id
return id
})
restID := <-c
But during dry run, this won’t work because there is no ID yet and this is stops waiting for the channel. I think I can work around this by simply adding an if statement
if !ctx.DryRun() {}
But I’m not sure that’s the correct optiongreen-morning-1318
03/19/2020, 6:24 PMwhite-balloon-205
The integration needs the ID of the Resource and to do a LookupResource I need a raw string value of the API Gateway ID.Can you do the
LookupResource
inside an .Apply
?green-morning-1318
03/19/2020, 6:29 PMwhite-balloon-205
gateway = new Gateway();
new Integrattion({
resource: gateway.id.apply(gatewayId => getResource(gatewayId)),
})
green-morning-1318
03/19/2020, 7:22 PM