Terraform v0.11.10
+ provider.google v1.20.0
+ provider.google-beta v1.20.0
resource "google_compute_router_nat" "advanced-nat" {
name = "nat-1"
router = "${google_compute_router.router.name}"
region = "us-central1"
nat_ip_allocate_option = "MANUAL_ONLY"
nat_ips = ["${google_compute_address.*.address.self_link}"]
source_subnetwork_ip_ranges_to_nat = "LIST_OF_SUBNETWORKS"
subnetwork {
name = "${google_compute_subnetwork.subnetwork.self_link}"
}
}
Then later add another subnetwork
subnetwork {
name = "${google_compute_subnetwork.subnetwork-2.self_link}"
}
The subnetwork-2 should be added to the highly available Cloud NAT. You can add/edit in the console without recreating the Cloud NAT.
The whole google_compute_router_nat gets destroyed then recreated.
Where's the plan?
Unfortunately as of right now compute_router_nat doesn't support any in place updates. I'll update labels and title to reflect the root problem.
@chrisst where is this described ? Since it can be updated in place I am surprised the API does not allow this
It's not a limitation of the api, it's just something that didn't get implemented in the first pass of this resource when it was written.
CC'ing @cornmander (author) to see if he has time to add it, otherwise we'll try and get to it soon.
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!
Most helpful comment
It's not a limitation of the api, it's just something that didn't get implemented in the first pass of this resource when it was written.
CC'ing @cornmander (author) to see if he has time to add it, otherwise we'll try and get to it soon.