RouterNat

A NAT service created in a router.

To get more information about RouterNat, see:

Create a RouterNat Resource

def RouterNat(resource_name, opts=None, drain_nat_ips=None, icmp_idle_timeout_sec=None, log_config=None, min_ports_per_vm=None, name=None, nat_ip_allocate_option=None, nat_ips=None, project=None, region=None, router=None, source_subnetwork_ip_ranges_to_nat=None, subnetworks=None, tcp_established_idle_timeout_sec=None, tcp_transitory_idle_timeout_sec=None, udp_idle_timeout_sec=None, __props__=None);
func NewRouterNat(ctx *Context, name string, args RouterNatArgs, opts ...ResourceOption) (*RouterNat, error)
public RouterNat(string name, RouterNatArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args RouterNatArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args RouterNatArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args RouterNatArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

RouterNat Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The RouterNat resource accepts the following input properties:

NatIpAllocateOption string

How external IPs should be allocated for this NAT. Valid values are AUTO_ONLY for only allowing NAT IPs allocated by Google Cloud Platform, or MANUAL_ONLY for only user-allocated NAT IP addresses.

Router string

The name of the Cloud Router in which this NAT will be configured.

SourceSubnetworkIpRangesToNat string

How NAT should be configured per Subnetwork. If ALL_SUBNETWORKS_ALL_IP_RANGES, all of the IP ranges in every Subnetwork are allowed to Nat. If ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, all of the primary IP ranges in every Subnetwork are allowed to Nat. LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below). Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other RouterNat section in any Router for this network in this region.

DrainNatIps List<string>

A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT.

IcmpIdleTimeoutSec int

Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.

LogConfig RouterNatLogConfigArgs

Configuration for logging on NAT Structure is documented below.

MinPortsPerVm int

Minimum number of ports allocated to a VM from this NAT.

Name string

Self-link of subnetwork to NAT

NatIps List<string>

Self-links of NAT IPs. Only valid if natIpAllocateOption is set to MANUAL_ONLY.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Region string

Region where the router and NAT reside.

Subnetworks List<RouterNatSubnetworkArgs>

One or more subnetwork NAT configurations. Only used if source_subnetwork_ip_ranges_to_nat is set to LIST_OF_SUBNETWORKS Structure is documented below.

TcpEstablishedIdleTimeoutSec int

Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.

TcpTransitoryIdleTimeoutSec int

Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.

UdpIdleTimeoutSec int

Timeout (in seconds) for UDP connections. Defaults to 30s if not set.

NatIpAllocateOption string

How external IPs should be allocated for this NAT. Valid values are AUTO_ONLY for only allowing NAT IPs allocated by Google Cloud Platform, or MANUAL_ONLY for only user-allocated NAT IP addresses.

Router string

The name of the Cloud Router in which this NAT will be configured.

SourceSubnetworkIpRangesToNat string

How NAT should be configured per Subnetwork. If ALL_SUBNETWORKS_ALL_IP_RANGES, all of the IP ranges in every Subnetwork are allowed to Nat. If ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, all of the primary IP ranges in every Subnetwork are allowed to Nat. LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below). Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other RouterNat section in any Router for this network in this region.

DrainNatIps []string

A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT.

IcmpIdleTimeoutSec int

Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.

LogConfig RouterNatLogConfig

Configuration for logging on NAT Structure is documented below.

MinPortsPerVm int

Minimum number of ports allocated to a VM from this NAT.

Name string

Self-link of subnetwork to NAT

NatIps []string

Self-links of NAT IPs. Only valid if natIpAllocateOption is set to MANUAL_ONLY.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Region string

Region where the router and NAT reside.

Subnetworks []RouterNatSubnetwork

One or more subnetwork NAT configurations. Only used if source_subnetwork_ip_ranges_to_nat is set to LIST_OF_SUBNETWORKS Structure is documented below.

TcpEstablishedIdleTimeoutSec int

Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.

TcpTransitoryIdleTimeoutSec int

Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.

UdpIdleTimeoutSec int

Timeout (in seconds) for UDP connections. Defaults to 30s if not set.

natIpAllocateOption string

How external IPs should be allocated for this NAT. Valid values are AUTO_ONLY for only allowing NAT IPs allocated by Google Cloud Platform, or MANUAL_ONLY for only user-allocated NAT IP addresses.

router string

The name of the Cloud Router in which this NAT will be configured.

sourceSubnetworkIpRangesToNat string

How NAT should be configured per Subnetwork. If ALL_SUBNETWORKS_ALL_IP_RANGES, all of the IP ranges in every Subnetwork are allowed to Nat. If ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, all of the primary IP ranges in every Subnetwork are allowed to Nat. LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below). Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other RouterNat section in any Router for this network in this region.

drainNatIps string[]

A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT.

icmpIdleTimeoutSec number

Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.

logConfig RouterNatLogConfig

Configuration for logging on NAT Structure is documented below.

minPortsPerVm number

Minimum number of ports allocated to a VM from this NAT.

name string

Self-link of subnetwork to NAT

natIps string[]

Self-links of NAT IPs. Only valid if natIpAllocateOption is set to MANUAL_ONLY.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

region string

Region where the router and NAT reside.

subnetworks RouterNatSubnetwork[]

One or more subnetwork NAT configurations. Only used if source_subnetwork_ip_ranges_to_nat is set to LIST_OF_SUBNETWORKS Structure is documented below.

tcpEstablishedIdleTimeoutSec number

Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.

tcpTransitoryIdleTimeoutSec number

Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.

udpIdleTimeoutSec number

Timeout (in seconds) for UDP connections. Defaults to 30s if not set.

nat_ip_allocate_option str

How external IPs should be allocated for this NAT. Valid values are AUTO_ONLY for only allowing NAT IPs allocated by Google Cloud Platform, or MANUAL_ONLY for only user-allocated NAT IP addresses.

router str

The name of the Cloud Router in which this NAT will be configured.

source_subnetwork_ip_ranges_to_nat str

How NAT should be configured per Subnetwork. If ALL_SUBNETWORKS_ALL_IP_RANGES, all of the IP ranges in every Subnetwork are allowed to Nat. If ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, all of the primary IP ranges in every Subnetwork are allowed to Nat. LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below). Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other RouterNat section in any Router for this network in this region.

drain_nat_ips List[str]

A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT.

icmp_idle_timeout_sec float

Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.

log_config Dict[RouterNatLogConfig]

Configuration for logging on NAT Structure is documented below.

min_ports_per_vm float

Minimum number of ports allocated to a VM from this NAT.

name str

Self-link of subnetwork to NAT

nat_ips List[str]

Self-links of NAT IPs. Only valid if natIpAllocateOption is set to MANUAL_ONLY.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

region str

Region where the router and NAT reside.

subnetworks List[RouterNatSubnetwork]

One or more subnetwork NAT configurations. Only used if source_subnetwork_ip_ranges_to_nat is set to LIST_OF_SUBNETWORKS Structure is documented below.

tcp_established_idle_timeout_sec float

Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.

tcp_transitory_idle_timeout_sec float

Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.

udp_idle_timeout_sec float

Timeout (in seconds) for UDP connections. Defaults to 30s if not set.

Outputs

All input properties are implicitly available as output properties. Additionally, the RouterNat resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing RouterNat Resource

Get an existing RouterNat resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: RouterNatState, opts?: CustomResourceOptions): RouterNat
static get(resource_name, id, opts=None, drain_nat_ips=None, icmp_idle_timeout_sec=None, log_config=None, min_ports_per_vm=None, name=None, nat_ip_allocate_option=None, nat_ips=None, project=None, region=None, router=None, source_subnetwork_ip_ranges_to_nat=None, subnetworks=None, tcp_established_idle_timeout_sec=None, tcp_transitory_idle_timeout_sec=None, udp_idle_timeout_sec=None, __props__=None);
func GetRouterNat(ctx *Context, name string, id IDInput, state *RouterNatState, opts ...ResourceOption) (*RouterNat, error)
public static RouterNat Get(string name, Input<string> id, RouterNatState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

DrainNatIps List<string>

A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT.

IcmpIdleTimeoutSec int

Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.

LogConfig RouterNatLogConfigArgs

Configuration for logging on NAT Structure is documented below.

MinPortsPerVm int

Minimum number of ports allocated to a VM from this NAT.

Name string

Self-link of subnetwork to NAT

NatIpAllocateOption string

How external IPs should be allocated for this NAT. Valid values are AUTO_ONLY for only allowing NAT IPs allocated by Google Cloud Platform, or MANUAL_ONLY for only user-allocated NAT IP addresses.

NatIps List<string>

Self-links of NAT IPs. Only valid if natIpAllocateOption is set to MANUAL_ONLY.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Region string

Region where the router and NAT reside.

Router string

The name of the Cloud Router in which this NAT will be configured.

SourceSubnetworkIpRangesToNat string

How NAT should be configured per Subnetwork. If ALL_SUBNETWORKS_ALL_IP_RANGES, all of the IP ranges in every Subnetwork are allowed to Nat. If ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, all of the primary IP ranges in every Subnetwork are allowed to Nat. LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below). Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other RouterNat section in any Router for this network in this region.

Subnetworks List<RouterNatSubnetworkArgs>

One or more subnetwork NAT configurations. Only used if source_subnetwork_ip_ranges_to_nat is set to LIST_OF_SUBNETWORKS Structure is documented below.

TcpEstablishedIdleTimeoutSec int

Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.

TcpTransitoryIdleTimeoutSec int

Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.

UdpIdleTimeoutSec int

Timeout (in seconds) for UDP connections. Defaults to 30s if not set.

DrainNatIps []string

A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT.

IcmpIdleTimeoutSec int

Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.

LogConfig RouterNatLogConfig

Configuration for logging on NAT Structure is documented below.

MinPortsPerVm int

Minimum number of ports allocated to a VM from this NAT.

Name string

Self-link of subnetwork to NAT

NatIpAllocateOption string

How external IPs should be allocated for this NAT. Valid values are AUTO_ONLY for only allowing NAT IPs allocated by Google Cloud Platform, or MANUAL_ONLY for only user-allocated NAT IP addresses.

NatIps []string

Self-links of NAT IPs. Only valid if natIpAllocateOption is set to MANUAL_ONLY.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Region string

Region where the router and NAT reside.

Router string

The name of the Cloud Router in which this NAT will be configured.

SourceSubnetworkIpRangesToNat string

How NAT should be configured per Subnetwork. If ALL_SUBNETWORKS_ALL_IP_RANGES, all of the IP ranges in every Subnetwork are allowed to Nat. If ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, all of the primary IP ranges in every Subnetwork are allowed to Nat. LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below). Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other RouterNat section in any Router for this network in this region.

Subnetworks []RouterNatSubnetwork

One or more subnetwork NAT configurations. Only used if source_subnetwork_ip_ranges_to_nat is set to LIST_OF_SUBNETWORKS Structure is documented below.

TcpEstablishedIdleTimeoutSec int

Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.

TcpTransitoryIdleTimeoutSec int

Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.

UdpIdleTimeoutSec int

Timeout (in seconds) for UDP connections. Defaults to 30s if not set.

drainNatIps string[]

A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT.

icmpIdleTimeoutSec number

Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.

logConfig RouterNatLogConfig

Configuration for logging on NAT Structure is documented below.

minPortsPerVm number

Minimum number of ports allocated to a VM from this NAT.

name string

Self-link of subnetwork to NAT

natIpAllocateOption string

How external IPs should be allocated for this NAT. Valid values are AUTO_ONLY for only allowing NAT IPs allocated by Google Cloud Platform, or MANUAL_ONLY for only user-allocated NAT IP addresses.

natIps string[]

Self-links of NAT IPs. Only valid if natIpAllocateOption is set to MANUAL_ONLY.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

region string

Region where the router and NAT reside.

router string

The name of the Cloud Router in which this NAT will be configured.

sourceSubnetworkIpRangesToNat string

How NAT should be configured per Subnetwork. If ALL_SUBNETWORKS_ALL_IP_RANGES, all of the IP ranges in every Subnetwork are allowed to Nat. If ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, all of the primary IP ranges in every Subnetwork are allowed to Nat. LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below). Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other RouterNat section in any Router for this network in this region.

subnetworks RouterNatSubnetwork[]

One or more subnetwork NAT configurations. Only used if source_subnetwork_ip_ranges_to_nat is set to LIST_OF_SUBNETWORKS Structure is documented below.

tcpEstablishedIdleTimeoutSec number

Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.

tcpTransitoryIdleTimeoutSec number

Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.

udpIdleTimeoutSec number

Timeout (in seconds) for UDP connections. Defaults to 30s if not set.

drain_nat_ips List[str]

A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT.

icmp_idle_timeout_sec float

Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.

log_config Dict[RouterNatLogConfig]

Configuration for logging on NAT Structure is documented below.

min_ports_per_vm float

Minimum number of ports allocated to a VM from this NAT.

name str

Self-link of subnetwork to NAT

nat_ip_allocate_option str

How external IPs should be allocated for this NAT. Valid values are AUTO_ONLY for only allowing NAT IPs allocated by Google Cloud Platform, or MANUAL_ONLY for only user-allocated NAT IP addresses.

nat_ips List[str]

Self-links of NAT IPs. Only valid if natIpAllocateOption is set to MANUAL_ONLY.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

region str

Region where the router and NAT reside.

router str

The name of the Cloud Router in which this NAT will be configured.

source_subnetwork_ip_ranges_to_nat str

How NAT should be configured per Subnetwork. If ALL_SUBNETWORKS_ALL_IP_RANGES, all of the IP ranges in every Subnetwork are allowed to Nat. If ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, all of the primary IP ranges in every Subnetwork are allowed to Nat. LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below). Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other RouterNat section in any Router for this network in this region.

subnetworks List[RouterNatSubnetwork]

One or more subnetwork NAT configurations. Only used if source_subnetwork_ip_ranges_to_nat is set to LIST_OF_SUBNETWORKS Structure is documented below.

tcp_established_idle_timeout_sec float

Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.

tcp_transitory_idle_timeout_sec float

Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.

udp_idle_timeout_sec float

Timeout (in seconds) for UDP connections. Defaults to 30s if not set.

Supporting Types

RouterNatLogConfig

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Enable bool

Indicates whether or not to export logs.

Filter string

Specifies the desired filtering of logs on this NAT.

Enable bool

Indicates whether or not to export logs.

Filter string

Specifies the desired filtering of logs on this NAT.

enable boolean

Indicates whether or not to export logs.

filter string

Specifies the desired filtering of logs on this NAT.

enable bool

Indicates whether or not to export logs.

filter str

Specifies the desired filtering of logs on this NAT.

RouterNatSubnetwork

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

Self-link of subnetwork to NAT

SourceIpRangesToNats List<string>

List of options for which source IPs in the subnetwork should have NAT enabled. Supported values include: ALL_IP_RANGES, LIST_OF_SECONDARY_IP_RANGES, PRIMARY_IP_RANGE.

SecondaryIpRangeNames List<string>

List of the secondary ranges of the subnetwork that are allowed to use NAT. This can be populated only if LIST_OF_SECONDARY_IP_RANGES is one of the values in sourceIpRangesToNat

Name string

Self-link of subnetwork to NAT

SourceIpRangesToNats []string

List of options for which source IPs in the subnetwork should have NAT enabled. Supported values include: ALL_IP_RANGES, LIST_OF_SECONDARY_IP_RANGES, PRIMARY_IP_RANGE.

SecondaryIpRangeNames []string

List of the secondary ranges of the subnetwork that are allowed to use NAT. This can be populated only if LIST_OF_SECONDARY_IP_RANGES is one of the values in sourceIpRangesToNat

name string

Self-link of subnetwork to NAT

sourceIpRangesToNats string[]

List of options for which source IPs in the subnetwork should have NAT enabled. Supported values include: ALL_IP_RANGES, LIST_OF_SECONDARY_IP_RANGES, PRIMARY_IP_RANGE.

secondaryIpRangeNames string[]

List of the secondary ranges of the subnetwork that are allowed to use NAT. This can be populated only if LIST_OF_SECONDARY_IP_RANGES is one of the values in sourceIpRangesToNat

name str

Self-link of subnetwork to NAT

sourceIpRangesToNats List[str]

List of options for which source IPs in the subnetwork should have NAT enabled. Supported values include: ALL_IP_RANGES, LIST_OF_SECONDARY_IP_RANGES, PRIMARY_IP_RANGE.

secondaryIpRangeNames List[str]

List of the secondary ranges of the subnetwork that are allowed to use NAT. This can be populated only if LIST_OF_SECONDARY_IP_RANGES is one of the values in sourceIpRangesToNat

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.