https://pulumi.com logo
#general
Title
# general
m

most-mouse-38002

07/04/2023, 12:50 PM
Is something like this going to risk recreation of the resources, or is this a safe thing to do (using the “iterator” in the name)?
Copy code
for i, sn := range c.Subnets {
		_, err := ec2.NewRouteTableAssociation(c.cfg.Ctx, fmt.Sprintf("rtAssociation-%v", i), &ec2.RouteTableAssociationArgs{
			RouteTableId: c.Vpc.DefaultRouteTableId,
			SubnetId:     sn.ID(),
		})
		if err != nil {
			return err
		}
	}
e

echoing-dinner-19531

07/05/2023, 8:02 AM
This should be fine