NAT Gateway rule
nat_gateway_rule
This is a simple module that supports creating or removing NATGateway rules. This module has a dependency on ionoscloud >= 6.0.2
Example Syntax
Returned object
For more examples please check out the tests here.
state: present
Available parameters for state present:
name str
True
The name of the NAT Gateway rule.
type str
True
Type of the NAT Gateway rule.
protocol str
False
Protocol of the NAT Gateway rule. Defaults to ALL. If protocol is 'ICMP' then targetPortRange start and end cannot be set.
source_subnet str
True
Source subnet of the NAT Gateway rule. For SNAT rules it specifies which packets this translation rule applies to based on the packets source IP address.
public_ip str
True
Public IP address of the NAT Gateway rule. Specifies the address used for masking outgoing packets source address field. Should be one of the customer reserved IP address already configured on the NAT Gateway resource
target_subnet str
False
Target or destination subnet of the NAT Gateway rule. For SNAT rules it specifies which packets this translation rule applies to based on the packets destination IP address. If none is provided, rule will match any address.
target_port_range dict
False
Target port range of the NAT Gateway rule. For SNAT rules it specifies which packets this translation rule applies to based on destination port. If none is provided, rule will match any port
datacenter str
True
The ID or name of the datacenter.
nat_gateway str
True
The ID or name of the NAT Gateway.
api_url str
False
The Ionos API base URL.
certificate_fingerprint str
False
The Ionos API certificate fingerprint.
username str
False
The Ionos username. Overrides the IONOS_USERNAME environment variable.
password str
False
The Ionos password. Overrides the IONOS_PASSWORD environment variable.
token str
False
The Ionos token. Overrides the IONOS_TOKEN environment variable.
wait bool
False
Wait for the resource to be created before returning. Default: True Options: [True, False]
wait_timeout int
False
How long before wait gives up, in seconds. Default: 600
state str
False
Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update']
state: absent
Available parameters for state absent:
name str
False
The name of the NAT Gateway rule.
datacenter str
True
The ID or name of the datacenter.
nat_gateway str
True
The ID or name of the NAT Gateway.
nat_gateway_rule str
True
The ID or name of the NAT Gateway rule.
api_url str
False
The Ionos API base URL.
certificate_fingerprint str
False
The Ionos API certificate fingerprint.
username str
False
The Ionos username. Overrides the IONOS_USERNAME environment variable.
password str
False
The Ionos password. Overrides the IONOS_PASSWORD environment variable.
token str
False
The Ionos token. Overrides the IONOS_TOKEN environment variable.
wait bool
False
Wait for the resource to be created before returning. Default: True Options: [True, False]
wait_timeout int
False
How long before wait gives up, in seconds. Default: 600
state str
False
Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update']
state: update
Available parameters for state update:
name str
False
The name of the NAT Gateway rule.
type str
False
Type of the NAT Gateway rule.
protocol str
False
Protocol of the NAT Gateway rule. Defaults to ALL. If protocol is 'ICMP' then targetPortRange start and end cannot be set.
source_subnet str
False
Source subnet of the NAT Gateway rule. For SNAT rules it specifies which packets this translation rule applies to based on the packets source IP address.
public_ip str
False
Public IP address of the NAT Gateway rule. Specifies the address used for masking outgoing packets source address field. Should be one of the customer reserved IP address already configured on the NAT Gateway resource
target_subnet str
False
Target or destination subnet of the NAT Gateway rule. For SNAT rules it specifies which packets this translation rule applies to based on the packets destination IP address. If none is provided, rule will match any address.
target_port_range dict
False
Target port range of the NAT Gateway rule. For SNAT rules it specifies which packets this translation rule applies to based on destination port. If none is provided, rule will match any port
datacenter str
True
The ID or name of the datacenter.
nat_gateway str
True
The ID or name of the NAT Gateway.
nat_gateway_rule str
True
The ID or name of the NAT Gateway rule.
api_url str
False
The Ionos API base URL.
certificate_fingerprint str
False
The Ionos API certificate fingerprint.
username str
False
The Ionos username. Overrides the IONOS_USERNAME environment variable.
password str
False
The Ionos password. Overrides the IONOS_PASSWORD environment variable.
token str
False
The Ionos token. Overrides the IONOS_TOKEN environment variable.
wait bool
False
Wait for the resource to be created before returning. Default: True Options: [True, False]
wait_timeout int
False
How long before wait gives up, in seconds. Default: 600
state str
False
Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update']
Last updated