-
Notifications
You must be signed in to change notification settings - Fork 131
How to resolve dependency on newly created custom (sub)network? #90
Comments
OK, so this work-around does the trick. Maybe this issue is irrelevant then, or should we look for a cleaner solution when the network and/or subnetwork are created in the same The reason I am doing this is to have our
|
I'm encountering the same issue and have posted my logs here for reference: https://gist.github.com/sabrehagen/74a964e17834c5c87a27125a4069be33 |
I commented on your gist with a proposed test to validate the presumption that this is the cause. |
I tried your fix and can confirm it works. I believe the dependency tree was lost when referencing |
Great :-) Yes, one should be able to just point to a |
I am creating a nat, based on the
gke-nat-gateway
example, in my own terraform templates. The core code is below. I am (re-)creating the network and subnetwork in the same set of terraform templates and I think I see a race condition.network = "${var.network}"
and same for subnetwork, but this fails with:I presume that is because some nat.module resources want to be created before the network and subnetwork are fully created (using the
name
does not create a terraform dependency on the existance of the (sub)network ?).I presume I can fix this with forcing hard dependencies on the pre-existence of the network and subnetwork in some other way?
Is there a proper fix for this case ? Thanks :-)
The text was updated successfully, but these errors were encountered: