sparse-intern-71089
09/14/2021, 3:51 AMworried-city-86458
09/14/2021, 5:29 AMvar subnetCount = OutputUtilities.GetValueAsync(privateSubnetIds.Apply(ids => ids.Length)).GetAwaiter().GetResult();
for (var i = 0; i < subnetCount; ++i)
{
new MountTarget($"{awsEksPrefix}-efs-mount-target-{i + 1}",
new MountTargetArgs
{
FileSystemId = efsfileSystem.Id,
SecurityGroups = { efsSecurityGroup.Id },
SubnetId = privateSubnetIds.GetAt(i)
},
new CustomResourceOptions { Provider = awsProvider });
}
tall-librarian-49374
09/14/2021, 7:46 AMapply
. The snippet above may work but I’m curious why you think it’s better than a loop inside apply?bumpy-grass-54508
09/14/2021, 1:11 PMworried-city-86458
09/14/2021, 3:40 PMtall-librarian-49374
09/14/2021, 3:56 PMworried-city-86458
09/14/2021, 5:00 PMtall-librarian-49374
09/14/2021, 8:30 PM