sparse-intern-71089
08/19/2020, 3:43 PMgorgeous-egg-16927
08/19/2020, 3:52 PMgorgeous-egg-16927
08/19/2020, 3:52 PMconst gcpConfig = envConfig.getOutput("gcpConfig")
gcpConfig.apply((regions: string[]) => {
for (const region of regions) {
// Do stuff here
}
})
gorgeous-egg-16927
08/19/2020, 3:53 PMabundant-airplane-93796
08/19/2020, 4:07 PMstring[]
which obv. doesn't work, and pulumi.Input<string[]>
but that doesn't give me the ability to apply or iterate.
Does it make sense for my custom resource to accept a pulumi.Output
as an argument? feels wrong, but maybe I'm getting hung up on naminggorgeous-egg-16927
08/19/2020, 5:05 PMpulumi.Input<string[]>
, which can handle Outputs as well as raw values.
If you need to interact with that value in the custom resource logic, then you can do something like pulumi.output(myInputValue).apply(x => {...})
little-cartoon-10569
08/19/2020, 8:56 PMconst regions
) inside an .apply()
? That doesn't work, I think?little-cartoon-10569
08/19/2020, 8:57 PM