mammoth-honey-6147
02/01/2021, 4:16 PMctx.Export
? I've tried looping round:
for _, subnet := range subnets {
ctx.Export("Subnet CIDR", subnet.CidrBlock)
ctx.Export("Subnet AZ", subnet.AvailabilityZone)
}
But, predictably, it only prints the last element in the arraylemon-agent-27707
02/01/2021, 8:53 PMvar outputArray []pulumi.StringOutput
for _, subnet := range subnets {
outputArray = append(outputArray, subnet.CidrBlock)
}
ctx.Export("CidrBlocks", outputArray)
mammoth-honey-6147
02/01/2021, 9:12 PMhallowed-author-21638
03/09/2021, 4:16 PMctx.Export("Ipv4Address", outputArray)
I get a missing method ElementType
So if I do
ctx.Export("Ipv4Address", outputArray[1])
I get a expected outcome but how can I properly iterate through all the elements in the array to have it reflect in Pulumi's output?lemon-agent-27707
03/09/2021, 7:21 PMhallowed-author-21638
03/09/2021, 8:42 PMlemon-agent-27707
03/09/2021, 9:43 PM