NAT Gateway

Creates and manages Nat Gateway objects.

Manages a Nat Gateway on IonosCloud.

Example Usage

resource "ionoscloud_datacenter" "example" {
    name                    = "Datacenter Example"
    location                = "us/las"
    description             = "Datacenter Description"
    sec_auth_protection     = false

resource "ionoscloud_ipblock" "example" {
    location                = "us/las"
    size                    = 2
    name                    = "IP Block Example"

resource "ionoscloud_lan" "example" {
    datacenter_id           =
    public                  = true
    name                    = "Lan Example"

resource "ionoscloud_natgateway" "example" {
    datacenter_id           =
    name                    = "example"
    public_ips              = [ ionoscloud_ipblock.example.ips[0], ionoscloud_ipblock.example.ips[1] ]
     lans {
        id                  =
        gateway_ips         = [ ""]

Argument reference

  • name - (Required)[string] Name of the NAT gateway.

  • public_ips - (Required)[list]Collection of public IP addresses of the NAT gateway. Should be customer reserved IP addresses in that location.

  • lans - (Required)[list] A list of Local Area Networks the node pool should be part of.

    • id - (Required)[int] Id for the LAN connected to the NAT gateway.

    • gateway_ips - (Optional)[list] Collection of gateway IP addresses of the NAT gateway. Will be auto-generated if not provided. Should ideally be an IP belonging to the same subnet as the LAN.

  • datacenter_id - (Required)[string] A Datacenter's UUID.


A Nat Gateway resource can be imported using its resource id and the datacenter id, e.g.

terraform import ionoscloud_natgateway.my_natgateway {datacenter uuid}/{nat gateway uuid}

Last updated