Any idea what might be wrong and where I should lo...
# golang
j
Any idea what might be wrong and where I should look? 😐
Copy code
Diagnostics:
  pulumi:pulumi:Stack (foo.de-dev):
    fatal error: sync: Unlock of unlocked RWMutex
I noticed that when I remove this code everything is fine:
Copy code
_, err = ec2.NewNatGateway(ctx, n.genUniqName("nat-gateway-foo", i), &ec2.NatGatewayArgs{
			AllocationId: elasticIP.ID(),
			SubnetId:     subnetPriv.ID(),
			Tags: pulumi.StringMap{
				"Name": pulumi.String(n.genUniqName("nat-gateway-foo", i)),
			},
		}, pulumi.Parent(elasticIP))
		if err != nil {
			return err
		}
I’m wondering why is that.
I’m creating elasticIP in the same loop as this NewNatGateway:
Copy code
for i, subnetPriv := range n.Subnets.PrivateSubnets {
And I don’t have any other place with nat-gateway or eip.
ahh ok, my bad - by mistake I used private subnet for it, instead of public 🤦‍♂️