fancy-spoon-7206
07/18/2022, 5:18 PMtype subnet struct {
Id pulumi.StringOutput
Az string
}
publicSubnet := make([]subnet, 0, 1)
for index, az := range azs {
publicSubnet = append(publicSubnet, subnet{
Id: PublicSubnets.Index(<http://pulumi.Int|pulumi.Int>(index)),
Az: az,
})
}
I would like to export publicSubnet, but that is not valid.
The idea is to get an Outputs similar to
{
"publicSubnets": [
{
"id": "subnet-02d7930bd",
"az": "us-east-2a"
},
{
"id": "subnet-0a89e59bb",
"az": "us-east-2b"
},
{
"id": "subnet-04658194f",
"az": "us-east-2c"
}
],
"privateSubnets": [
{
"id": "subnet-00a9f3a9d6",
"az": "us-east-2a"
},
{
"id": "subnet-026eed9351,
"az": "us-east-2b"
},
{
"id": "subnet-0bfabcc5f666637c1",
"az": "us-east-2c"
}
]
}
bored-oyster-3147
07/19/2022, 11:44 PM