mammoth-honey-6147
10/15/2021, 4:15 PMstack output
object? In one stack I export a pulumi.StringArray{}
, when I reference this in another stack it returns type pulumi.AnyOutput
. I want to iterate over this like an array, but currently the only way I've got round to do this is via reflection, ie:
output1 := stackReference.GetOutput(pulumi.String("Infra"))
_ = output1.ApplyT(func(list interface{}) string {
switch reflect.TypeOf(list).Kind() {
case reflect.Slice:
s := reflect.ValueOf(list)
for i := 0; i < s.Len(); i++ {
billowy-army-68599
10/15/2021, 4:48 PMmammoth-honey-6147
10/15/2021, 4:50 PM