NatRule
Manages a Load Balancer NAT Rule.
NOTE: This resource cannot be used with with virtual machine scale sets, instead use the
azure.lb.NatPoolresource.NOTE When using this resource, the Load Balancer needs to have a FrontEnd IP Configuration Attached
Create a NatRule Resource
new NatRule(name: string, args: NatRuleArgs, opts?: CustomResourceOptions);def NatRule(resource_name, opts=None, backend_port=None, enable_floating_ip=None, enable_tcp_reset=None, frontend_ip_configuration_name=None, frontend_port=None, idle_timeout_in_minutes=None, loadbalancer_id=None, name=None, protocol=None, resource_group_name=None, __props__=None);func NewNatRule(ctx *Context, name string, args NatRuleArgs, opts ...ResourceOption) (*NatRule, error)public NatRule(string name, NatRuleArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args NatRuleArgs
- 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 NatRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NatRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
NatRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The NatRule resource accepts the following input properties:
- Backend
Port int The port used for internal connections on the endpoint. Possible values range between 1 and 65535, inclusive.
- Frontend
Ip stringConfiguration Name The name of the frontend IP configuration exposing this rule.
- Frontend
Port int The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 1 and 65534, inclusive.
- Loadbalancer
Id string The ID of the Load Balancer in which to create the NAT Rule.
- Protocol string
The transport protocol for the external endpoint. Possible values are
Udp,TcporAll.- Resource
Group stringName The name of the resource group in which to create the resource.
- Enable
Floating boolIp Are the Floating IPs enabled for this Load Balncer Rule? A “floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to
false.- Enable
Tcp boolReset Is TCP Reset enabled for this Load Balancer Rule? Defaults to
false.- Idle
Timeout intIn Minutes Specifies the idle timeout in minutes for TCP connections. Valid values are between
4and30minutes. Defaults to4minutes.- Name string
Specifies the name of the NAT Rule.
- Backend
Port int The port used for internal connections on the endpoint. Possible values range between 1 and 65535, inclusive.
- Frontend
Ip stringConfiguration Name The name of the frontend IP configuration exposing this rule.
- Frontend
Port int The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 1 and 65534, inclusive.
- Loadbalancer
Id string The ID of the Load Balancer in which to create the NAT Rule.
- Protocol string
The transport protocol for the external endpoint. Possible values are
Udp,TcporAll.- Resource
Group stringName The name of the resource group in which to create the resource.
- Enable
Floating boolIp Are the Floating IPs enabled for this Load Balncer Rule? A “floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to
false.- Enable
Tcp boolReset Is TCP Reset enabled for this Load Balancer Rule? Defaults to
false.- Idle
Timeout intIn Minutes Specifies the idle timeout in minutes for TCP connections. Valid values are between
4and30minutes. Defaults to4minutes.- Name string
Specifies the name of the NAT Rule.
- backend
Port number The port used for internal connections on the endpoint. Possible values range between 1 and 65535, inclusive.
- frontend
Ip stringConfiguration Name The name of the frontend IP configuration exposing this rule.
- frontend
Port number The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 1 and 65534, inclusive.
- loadbalancer
Id string The ID of the Load Balancer in which to create the NAT Rule.
- protocol string
The transport protocol for the external endpoint. Possible values are
Udp,TcporAll.- resource
Group stringName The name of the resource group in which to create the resource.
- enable
Floating booleanIp Are the Floating IPs enabled for this Load Balncer Rule? A “floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to
false.- enable
Tcp booleanReset Is TCP Reset enabled for this Load Balancer Rule? Defaults to
false.- idle
Timeout numberIn Minutes Specifies the idle timeout in minutes for TCP connections. Valid values are between
4and30minutes. Defaults to4minutes.- name string
Specifies the name of the NAT Rule.
- backend_
port float The port used for internal connections on the endpoint. Possible values range between 1 and 65535, inclusive.
- frontend_
ip_ strconfiguration_ name The name of the frontend IP configuration exposing this rule.
- frontend_
port float The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 1 and 65534, inclusive.
- loadbalancer_
id str The ID of the Load Balancer in which to create the NAT Rule.
- protocol str
The transport protocol for the external endpoint. Possible values are
Udp,TcporAll.- resource_
group_ strname The name of the resource group in which to create the resource.
- enable_
floating_ boolip Are the Floating IPs enabled for this Load Balncer Rule? A “floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to
false.- enable_
tcp_ boolreset Is TCP Reset enabled for this Load Balancer Rule? Defaults to
false.- idle_
timeout_ floatin_ minutes Specifies the idle timeout in minutes for TCP connections. Valid values are between
4and30minutes. Defaults to4minutes.- name str
Specifies the name of the NAT Rule.
Outputs
All input properties are implicitly available as output properties. Additionally, the NatRule resource produces the following output properties:
- Backend
Ip stringConfiguration Id - Frontend
Ip stringConfiguration Id - Id string
- The provider-assigned unique ID for this managed resource.
- Backend
Ip stringConfiguration Id - Frontend
Ip stringConfiguration Id - Id string
- The provider-assigned unique ID for this managed resource.
- backend
Ip stringConfiguration Id - frontend
Ip stringConfiguration Id - id string
- The provider-assigned unique ID for this managed resource.
- backend_
ip_ strconfiguration_ id - frontend_
ip_ strconfiguration_ id - id str
- The provider-assigned unique ID for this managed resource.
Look up an Existing NatRule Resource
Get an existing NatRule 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?: NatRuleState, opts?: CustomResourceOptions): NatRulestatic get(resource_name, id, opts=None, backend_ip_configuration_id=None, backend_port=None, enable_floating_ip=None, enable_tcp_reset=None, frontend_ip_configuration_id=None, frontend_ip_configuration_name=None, frontend_port=None, idle_timeout_in_minutes=None, loadbalancer_id=None, name=None, protocol=None, resource_group_name=None, __props__=None);func GetNatRule(ctx *Context, name string, id IDInput, state *NatRuleState, opts ...ResourceOption) (*NatRule, error)public static NatRule Get(string name, Input<string> id, NatRuleState? 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:
- Backend
Ip stringConfiguration Id - Backend
Port int The port used for internal connections on the endpoint. Possible values range between 1 and 65535, inclusive.
- Enable
Floating boolIp Are the Floating IPs enabled for this Load Balncer Rule? A “floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to
false.- Enable
Tcp boolReset Is TCP Reset enabled for this Load Balancer Rule? Defaults to
false.- Frontend
Ip stringConfiguration Id - Frontend
Ip stringConfiguration Name The name of the frontend IP configuration exposing this rule.
- Frontend
Port int The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 1 and 65534, inclusive.
- Idle
Timeout intIn Minutes Specifies the idle timeout in minutes for TCP connections. Valid values are between
4and30minutes. Defaults to4minutes.- Loadbalancer
Id string The ID of the Load Balancer in which to create the NAT Rule.
- Name string
Specifies the name of the NAT Rule.
- Protocol string
The transport protocol for the external endpoint. Possible values are
Udp,TcporAll.- Resource
Group stringName The name of the resource group in which to create the resource.
- Backend
Ip stringConfiguration Id - Backend
Port int The port used for internal connections on the endpoint. Possible values range between 1 and 65535, inclusive.
- Enable
Floating boolIp Are the Floating IPs enabled for this Load Balncer Rule? A “floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to
false.- Enable
Tcp boolReset Is TCP Reset enabled for this Load Balancer Rule? Defaults to
false.- Frontend
Ip stringConfiguration Id - Frontend
Ip stringConfiguration Name The name of the frontend IP configuration exposing this rule.
- Frontend
Port int The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 1 and 65534, inclusive.
- Idle
Timeout intIn Minutes Specifies the idle timeout in minutes for TCP connections. Valid values are between
4and30minutes. Defaults to4minutes.- Loadbalancer
Id string The ID of the Load Balancer in which to create the NAT Rule.
- Name string
Specifies the name of the NAT Rule.
- Protocol string
The transport protocol for the external endpoint. Possible values are
Udp,TcporAll.- Resource
Group stringName The name of the resource group in which to create the resource.
- backend
Ip stringConfiguration Id - backend
Port number The port used for internal connections on the endpoint. Possible values range between 1 and 65535, inclusive.
- enable
Floating booleanIp Are the Floating IPs enabled for this Load Balncer Rule? A “floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to
false.- enable
Tcp booleanReset Is TCP Reset enabled for this Load Balancer Rule? Defaults to
false.- frontend
Ip stringConfiguration Id - frontend
Ip stringConfiguration Name The name of the frontend IP configuration exposing this rule.
- frontend
Port number The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 1 and 65534, inclusive.
- idle
Timeout numberIn Minutes Specifies the idle timeout in minutes for TCP connections. Valid values are between
4and30minutes. Defaults to4minutes.- loadbalancer
Id string The ID of the Load Balancer in which to create the NAT Rule.
- name string
Specifies the name of the NAT Rule.
- protocol string
The transport protocol for the external endpoint. Possible values are
Udp,TcporAll.- resource
Group stringName The name of the resource group in which to create the resource.
- backend_
ip_ strconfiguration_ id - backend_
port float The port used for internal connections on the endpoint. Possible values range between 1 and 65535, inclusive.
- enable_
floating_ boolip Are the Floating IPs enabled for this Load Balncer Rule? A “floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to
false.- enable_
tcp_ boolreset Is TCP Reset enabled for this Load Balancer Rule? Defaults to
false.- frontend_
ip_ strconfiguration_ id - frontend_
ip_ strconfiguration_ name The name of the frontend IP configuration exposing this rule.
- frontend_
port float The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 1 and 65534, inclusive.
- idle_
timeout_ floatin_ minutes Specifies the idle timeout in minutes for TCP connections. Valid values are between
4and30minutes. Defaults to4minutes.- loadbalancer_
id str The ID of the Load Balancer in which to create the NAT Rule.
- name str
Specifies the name of the NAT Rule.
- protocol str
The transport protocol for the external endpoint. Possible values are
Udp,TcporAll.- resource_
group_ strname The name of the resource group in which to create the resource.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.