Terraform-provider-google: compute_router_nat doesn't support Update

Created on 31 Dec 2018  ·  5Comments  ·  Source: hashicorp/terraform-provider-google

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
  • If an issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to "hashibot", a community member has claimed the issue already.

Terraform Version

Terraform v0.11.10
+ provider.google v1.20.0
+ provider.google-beta v1.20.0

Affected Resource(s)

  • google_compute_router_nat

Terraform Configuration Files

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}"
  }

Expected Behavior

The subnetwork-2 should be added to the highly available Cloud NAT. You can add/edit in the console without recreating the Cloud NAT.

Actual Behavior

The whole google_compute_router_nat gets destroyed then recreated.

enhancement

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.

All 5 comments

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!

Was this page helpful?
0 / 5 - 0 ratings