Skip to content

[Feature Request] Add support for google_compute_router_nat_address to improve NAT IPs lifecycle handling #139

@Byh0ki

Description

@Byh0ki

TL;DR

The google TF provider has a compute_router_nat_address resource that handles the NAT IPs lifecycle automatically for a given compute_router_nat instance. It could be nice to provide this as an option alongside the already existing nat_ips & drain_nat_ips parameters in the nats object.

Terraform Resources

https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_router_nat_address

Detailed design

Design remains open to discussion but the idea would be to give the user a flag to either enable or disable the `compute_router_nat_address` usage when the `nat_ip_allocate_option` is set or defaults to `MANUAL_ONLY`. If the flag is `true`, we would then use the `initial_nat_ips` parameters in the `google_compute_router_nat` resource instead of `nat_ips` & `drain_nat_ips` and add an additional `google_compute_router_nat_address` bloc. A great example is available in the resource documentation page.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions