1. Packages
  2. Azure Classic
  3. API Docs
  4. network
  5. NetworkInterfaceNatRuleAssociation

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.network.NetworkInterfaceNatRuleAssociation

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    Manages the association between a Network Interface and a Load Balancer’s NAT Rule.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
        name: "example-network",
        addressSpaces: ["10.0.0.0/16"],
        location: example.location,
        resourceGroupName: example.name,
    });
    const exampleSubnet = new azure.network.Subnet("example", {
        name: "internal",
        resourceGroupName: example.name,
        virtualNetworkName: exampleVirtualNetwork.name,
        addressPrefixes: ["10.0.2.0/24"],
    });
    const examplePublicIp = new azure.network.PublicIp("example", {
        name: "example-pip",
        location: example.location,
        resourceGroupName: example.name,
        allocationMethod: "Static",
    });
    const exampleLoadBalancer = new azure.lb.LoadBalancer("example", {
        name: "example-lb",
        location: example.location,
        resourceGroupName: example.name,
        frontendIpConfigurations: [{
            name: "primary",
            publicIpAddressId: examplePublicIp.id,
        }],
    });
    const exampleNatRule = new azure.lb.NatRule("example", {
        resourceGroupName: example.name,
        loadbalancerId: exampleLoadBalancer.id,
        name: "RDPAccess",
        protocol: "Tcp",
        frontendPort: 3389,
        backendPort: 3389,
        frontendIpConfigurationName: "primary",
    });
    const exampleNetworkInterface = new azure.network.NetworkInterface("example", {
        name: "example-nic",
        location: example.location,
        resourceGroupName: example.name,
        ipConfigurations: [{
            name: "testconfiguration1",
            subnetId: exampleSubnet.id,
            privateIpAddressAllocation: "Dynamic",
        }],
    });
    const exampleNetworkInterfaceNatRuleAssociation = new azure.network.NetworkInterfaceNatRuleAssociation("example", {
        networkInterfaceId: exampleNetworkInterface.id,
        ipConfigurationName: "testconfiguration1",
        natRuleId: exampleNatRule.id,
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_virtual_network = azure.network.VirtualNetwork("example",
        name="example-network",
        address_spaces=["10.0.0.0/16"],
        location=example.location,
        resource_group_name=example.name)
    example_subnet = azure.network.Subnet("example",
        name="internal",
        resource_group_name=example.name,
        virtual_network_name=example_virtual_network.name,
        address_prefixes=["10.0.2.0/24"])
    example_public_ip = azure.network.PublicIp("example",
        name="example-pip",
        location=example.location,
        resource_group_name=example.name,
        allocation_method="Static")
    example_load_balancer = azure.lb.LoadBalancer("example",
        name="example-lb",
        location=example.location,
        resource_group_name=example.name,
        frontend_ip_configurations=[azure.lb.LoadBalancerFrontendIpConfigurationArgs(
            name="primary",
            public_ip_address_id=example_public_ip.id,
        )])
    example_nat_rule = azure.lb.NatRule("example",
        resource_group_name=example.name,
        loadbalancer_id=example_load_balancer.id,
        name="RDPAccess",
        protocol="Tcp",
        frontend_port=3389,
        backend_port=3389,
        frontend_ip_configuration_name="primary")
    example_network_interface = azure.network.NetworkInterface("example",
        name="example-nic",
        location=example.location,
        resource_group_name=example.name,
        ip_configurations=[azure.network.NetworkInterfaceIpConfigurationArgs(
            name="testconfiguration1",
            subnet_id=example_subnet.id,
            private_ip_address_allocation="Dynamic",
        )])
    example_network_interface_nat_rule_association = azure.network.NetworkInterfaceNatRuleAssociation("example",
        network_interface_id=example_network_interface.id,
        ip_configuration_name="testconfiguration1",
        nat_rule_id=example_nat_rule.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/lb"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
    			Name: pulumi.String("example-network"),
    			AddressSpaces: pulumi.StringArray{
    				pulumi.String("10.0.0.0/16"),
    			},
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    		})
    		if err != nil {
    			return err
    		}
    		exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
    			Name:               pulumi.String("internal"),
    			ResourceGroupName:  example.Name,
    			VirtualNetworkName: exampleVirtualNetwork.Name,
    			AddressPrefixes: pulumi.StringArray{
    				pulumi.String("10.0.2.0/24"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
    			Name:              pulumi.String("example-pip"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			AllocationMethod:  pulumi.String("Static"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleLoadBalancer, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{
    			Name:              pulumi.String("example-lb"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			FrontendIpConfigurations: lb.LoadBalancerFrontendIpConfigurationArray{
    				&lb.LoadBalancerFrontendIpConfigurationArgs{
    					Name:              pulumi.String("primary"),
    					PublicIpAddressId: examplePublicIp.ID(),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleNatRule, err := lb.NewNatRule(ctx, "example", &lb.NatRuleArgs{
    			ResourceGroupName:           example.Name,
    			LoadbalancerId:              exampleLoadBalancer.ID(),
    			Name:                        pulumi.String("RDPAccess"),
    			Protocol:                    pulumi.String("Tcp"),
    			FrontendPort:                pulumi.Int(3389),
    			BackendPort:                 pulumi.Int(3389),
    			FrontendIpConfigurationName: pulumi.String("primary"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{
    			Name:              pulumi.String("example-nic"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			IpConfigurations: network.NetworkInterfaceIpConfigurationArray{
    				&network.NetworkInterfaceIpConfigurationArgs{
    					Name:                       pulumi.String("testconfiguration1"),
    					SubnetId:                   exampleSubnet.ID(),
    					PrivateIpAddressAllocation: pulumi.String("Dynamic"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = network.NewNetworkInterfaceNatRuleAssociation(ctx, "example", &network.NetworkInterfaceNatRuleAssociationArgs{
    			NetworkInterfaceId:  exampleNetworkInterface.ID(),
    			IpConfigurationName: pulumi.String("testconfiguration1"),
    			NatRuleId:           exampleNatRule.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
        {
            Name = "example-network",
            AddressSpaces = new[]
            {
                "10.0.0.0/16",
            },
            Location = example.Location,
            ResourceGroupName = example.Name,
        });
    
        var exampleSubnet = new Azure.Network.Subnet("example", new()
        {
            Name = "internal",
            ResourceGroupName = example.Name,
            VirtualNetworkName = exampleVirtualNetwork.Name,
            AddressPrefixes = new[]
            {
                "10.0.2.0/24",
            },
        });
    
        var examplePublicIp = new Azure.Network.PublicIp("example", new()
        {
            Name = "example-pip",
            Location = example.Location,
            ResourceGroupName = example.Name,
            AllocationMethod = "Static",
        });
    
        var exampleLoadBalancer = new Azure.Lb.LoadBalancer("example", new()
        {
            Name = "example-lb",
            Location = example.Location,
            ResourceGroupName = example.Name,
            FrontendIpConfigurations = new[]
            {
                new Azure.Lb.Inputs.LoadBalancerFrontendIpConfigurationArgs
                {
                    Name = "primary",
                    PublicIpAddressId = examplePublicIp.Id,
                },
            },
        });
    
        var exampleNatRule = new Azure.Lb.NatRule("example", new()
        {
            ResourceGroupName = example.Name,
            LoadbalancerId = exampleLoadBalancer.Id,
            Name = "RDPAccess",
            Protocol = "Tcp",
            FrontendPort = 3389,
            BackendPort = 3389,
            FrontendIpConfigurationName = "primary",
        });
    
        var exampleNetworkInterface = new Azure.Network.NetworkInterface("example", new()
        {
            Name = "example-nic",
            Location = example.Location,
            ResourceGroupName = example.Name,
            IpConfigurations = new[]
            {
                new Azure.Network.Inputs.NetworkInterfaceIpConfigurationArgs
                {
                    Name = "testconfiguration1",
                    SubnetId = exampleSubnet.Id,
                    PrivateIpAddressAllocation = "Dynamic",
                },
            },
        });
    
        var exampleNetworkInterfaceNatRuleAssociation = new Azure.Network.NetworkInterfaceNatRuleAssociation("example", new()
        {
            NetworkInterfaceId = exampleNetworkInterface.Id,
            IpConfigurationName = "testconfiguration1",
            NatRuleId = exampleNatRule.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.network.VirtualNetwork;
    import com.pulumi.azure.network.VirtualNetworkArgs;
    import com.pulumi.azure.network.Subnet;
    import com.pulumi.azure.network.SubnetArgs;
    import com.pulumi.azure.network.PublicIp;
    import com.pulumi.azure.network.PublicIpArgs;
    import com.pulumi.azure.lb.LoadBalancer;
    import com.pulumi.azure.lb.LoadBalancerArgs;
    import com.pulumi.azure.lb.inputs.LoadBalancerFrontendIpConfigurationArgs;
    import com.pulumi.azure.lb.NatRule;
    import com.pulumi.azure.lb.NatRuleArgs;
    import com.pulumi.azure.network.NetworkInterface;
    import com.pulumi.azure.network.NetworkInterfaceArgs;
    import com.pulumi.azure.network.inputs.NetworkInterfaceIpConfigurationArgs;
    import com.pulumi.azure.network.NetworkInterfaceNatRuleAssociation;
    import com.pulumi.azure.network.NetworkInterfaceNatRuleAssociationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
                .name("example-network")
                .addressSpaces("10.0.0.0/16")
                .location(example.location())
                .resourceGroupName(example.name())
                .build());
    
            var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
                .name("internal")
                .resourceGroupName(example.name())
                .virtualNetworkName(exampleVirtualNetwork.name())
                .addressPrefixes("10.0.2.0/24")
                .build());
    
            var examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder()
                .name("example-pip")
                .location(example.location())
                .resourceGroupName(example.name())
                .allocationMethod("Static")
                .build());
    
            var exampleLoadBalancer = new LoadBalancer("exampleLoadBalancer", LoadBalancerArgs.builder()
                .name("example-lb")
                .location(example.location())
                .resourceGroupName(example.name())
                .frontendIpConfigurations(LoadBalancerFrontendIpConfigurationArgs.builder()
                    .name("primary")
                    .publicIpAddressId(examplePublicIp.id())
                    .build())
                .build());
    
            var exampleNatRule = new NatRule("exampleNatRule", NatRuleArgs.builder()
                .resourceGroupName(example.name())
                .loadbalancerId(exampleLoadBalancer.id())
                .name("RDPAccess")
                .protocol("Tcp")
                .frontendPort(3389)
                .backendPort(3389)
                .frontendIpConfigurationName("primary")
                .build());
    
            var exampleNetworkInterface = new NetworkInterface("exampleNetworkInterface", NetworkInterfaceArgs.builder()
                .name("example-nic")
                .location(example.location())
                .resourceGroupName(example.name())
                .ipConfigurations(NetworkInterfaceIpConfigurationArgs.builder()
                    .name("testconfiguration1")
                    .subnetId(exampleSubnet.id())
                    .privateIpAddressAllocation("Dynamic")
                    .build())
                .build());
    
            var exampleNetworkInterfaceNatRuleAssociation = new NetworkInterfaceNatRuleAssociation("exampleNetworkInterfaceNatRuleAssociation", NetworkInterfaceNatRuleAssociationArgs.builder()
                .networkInterfaceId(exampleNetworkInterface.id())
                .ipConfigurationName("testconfiguration1")
                .natRuleId(exampleNatRule.id())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleVirtualNetwork:
        type: azure:network:VirtualNetwork
        name: example
        properties:
          name: example-network
          addressSpaces:
            - 10.0.0.0/16
          location: ${example.location}
          resourceGroupName: ${example.name}
      exampleSubnet:
        type: azure:network:Subnet
        name: example
        properties:
          name: internal
          resourceGroupName: ${example.name}
          virtualNetworkName: ${exampleVirtualNetwork.name}
          addressPrefixes:
            - 10.0.2.0/24
      examplePublicIp:
        type: azure:network:PublicIp
        name: example
        properties:
          name: example-pip
          location: ${example.location}
          resourceGroupName: ${example.name}
          allocationMethod: Static
      exampleLoadBalancer:
        type: azure:lb:LoadBalancer
        name: example
        properties:
          name: example-lb
          location: ${example.location}
          resourceGroupName: ${example.name}
          frontendIpConfigurations:
            - name: primary
              publicIpAddressId: ${examplePublicIp.id}
      exampleNatRule:
        type: azure:lb:NatRule
        name: example
        properties:
          resourceGroupName: ${example.name}
          loadbalancerId: ${exampleLoadBalancer.id}
          name: RDPAccess
          protocol: Tcp
          frontendPort: 3389
          backendPort: 3389
          frontendIpConfigurationName: primary
      exampleNetworkInterface:
        type: azure:network:NetworkInterface
        name: example
        properties:
          name: example-nic
          location: ${example.location}
          resourceGroupName: ${example.name}
          ipConfigurations:
            - name: testconfiguration1
              subnetId: ${exampleSubnet.id}
              privateIpAddressAllocation: Dynamic
      exampleNetworkInterfaceNatRuleAssociation:
        type: azure:network:NetworkInterfaceNatRuleAssociation
        name: example
        properties:
          networkInterfaceId: ${exampleNetworkInterface.id}
          ipConfigurationName: testconfiguration1
          natRuleId: ${exampleNatRule.id}
    

    Create NetworkInterfaceNatRuleAssociation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NetworkInterfaceNatRuleAssociation(name: string, args: NetworkInterfaceNatRuleAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def NetworkInterfaceNatRuleAssociation(resource_name: str,
                                           args: NetworkInterfaceNatRuleAssociationArgs,
                                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def NetworkInterfaceNatRuleAssociation(resource_name: str,
                                           opts: Optional[ResourceOptions] = None,
                                           ip_configuration_name: Optional[str] = None,
                                           nat_rule_id: Optional[str] = None,
                                           network_interface_id: Optional[str] = None)
    func NewNetworkInterfaceNatRuleAssociation(ctx *Context, name string, args NetworkInterfaceNatRuleAssociationArgs, opts ...ResourceOption) (*NetworkInterfaceNatRuleAssociation, error)
    public NetworkInterfaceNatRuleAssociation(string name, NetworkInterfaceNatRuleAssociationArgs args, CustomResourceOptions? opts = null)
    public NetworkInterfaceNatRuleAssociation(String name, NetworkInterfaceNatRuleAssociationArgs args)
    public NetworkInterfaceNatRuleAssociation(String name, NetworkInterfaceNatRuleAssociationArgs args, CustomResourceOptions options)
    
    type: azure:network:NetworkInterfaceNatRuleAssociation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args NetworkInterfaceNatRuleAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args NetworkInterfaceNatRuleAssociationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args NetworkInterfaceNatRuleAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkInterfaceNatRuleAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkInterfaceNatRuleAssociationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var networkInterfaceNatRuleAssociationResource = new Azure.Network.NetworkInterfaceNatRuleAssociation("networkInterfaceNatRuleAssociationResource", new()
    {
        IpConfigurationName = "string",
        NatRuleId = "string",
        NetworkInterfaceId = "string",
    });
    
    example, err := network.NewNetworkInterfaceNatRuleAssociation(ctx, "networkInterfaceNatRuleAssociationResource", &network.NetworkInterfaceNatRuleAssociationArgs{
    	IpConfigurationName: pulumi.String("string"),
    	NatRuleId:           pulumi.String("string"),
    	NetworkInterfaceId:  pulumi.String("string"),
    })
    
    var networkInterfaceNatRuleAssociationResource = new NetworkInterfaceNatRuleAssociation("networkInterfaceNatRuleAssociationResource", NetworkInterfaceNatRuleAssociationArgs.builder()
        .ipConfigurationName("string")
        .natRuleId("string")
        .networkInterfaceId("string")
        .build());
    
    network_interface_nat_rule_association_resource = azure.network.NetworkInterfaceNatRuleAssociation("networkInterfaceNatRuleAssociationResource",
        ip_configuration_name="string",
        nat_rule_id="string",
        network_interface_id="string")
    
    const networkInterfaceNatRuleAssociationResource = new azure.network.NetworkInterfaceNatRuleAssociation("networkInterfaceNatRuleAssociationResource", {
        ipConfigurationName: "string",
        natRuleId: "string",
        networkInterfaceId: "string",
    });
    
    type: azure:network:NetworkInterfaceNatRuleAssociation
    properties:
        ipConfigurationName: string
        natRuleId: string
        networkInterfaceId: string
    

    NetworkInterfaceNatRuleAssociation Resource Properties

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

    Inputs

    The NetworkInterfaceNatRuleAssociation resource accepts the following input properties:

    IpConfigurationName string
    The Name of the IP Configuration within the Network Interface which should be connected to the NAT Rule. Changing this forces a new resource to be created.
    NatRuleId string
    The ID of the Load Balancer NAT Rule which this Network Interface which should be connected to. Changing this forces a new resource to be created.
    NetworkInterfaceId string
    The ID of the Network Interface. Changing this forces a new resource to be created.
    IpConfigurationName string
    The Name of the IP Configuration within the Network Interface which should be connected to the NAT Rule. Changing this forces a new resource to be created.
    NatRuleId string
    The ID of the Load Balancer NAT Rule which this Network Interface which should be connected to. Changing this forces a new resource to be created.
    NetworkInterfaceId string
    The ID of the Network Interface. Changing this forces a new resource to be created.
    ipConfigurationName String
    The Name of the IP Configuration within the Network Interface which should be connected to the NAT Rule. Changing this forces a new resource to be created.
    natRuleId String
    The ID of the Load Balancer NAT Rule which this Network Interface which should be connected to. Changing this forces a new resource to be created.
    networkInterfaceId String
    The ID of the Network Interface. Changing this forces a new resource to be created.
    ipConfigurationName string
    The Name of the IP Configuration within the Network Interface which should be connected to the NAT Rule. Changing this forces a new resource to be created.
    natRuleId string
    The ID of the Load Balancer NAT Rule which this Network Interface which should be connected to. Changing this forces a new resource to be created.
    networkInterfaceId string
    The ID of the Network Interface. Changing this forces a new resource to be created.
    ip_configuration_name str
    The Name of the IP Configuration within the Network Interface which should be connected to the NAT Rule. Changing this forces a new resource to be created.
    nat_rule_id str
    The ID of the Load Balancer NAT Rule which this Network Interface which should be connected to. Changing this forces a new resource to be created.
    network_interface_id str
    The ID of the Network Interface. Changing this forces a new resource to be created.
    ipConfigurationName String
    The Name of the IP Configuration within the Network Interface which should be connected to the NAT Rule. Changing this forces a new resource to be created.
    natRuleId String
    The ID of the Load Balancer NAT Rule which this Network Interface which should be connected to. Changing this forces a new resource to be created.
    networkInterfaceId String
    The ID of the Network Interface. Changing this forces a new resource to be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NetworkInterfaceNatRuleAssociation 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 string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing NetworkInterfaceNatRuleAssociation Resource

    Get an existing NetworkInterfaceNatRuleAssociation 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?: NetworkInterfaceNatRuleAssociationState, opts?: CustomResourceOptions): NetworkInterfaceNatRuleAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ip_configuration_name: Optional[str] = None,
            nat_rule_id: Optional[str] = None,
            network_interface_id: Optional[str] = None) -> NetworkInterfaceNatRuleAssociation
    func GetNetworkInterfaceNatRuleAssociation(ctx *Context, name string, id IDInput, state *NetworkInterfaceNatRuleAssociationState, opts ...ResourceOption) (*NetworkInterfaceNatRuleAssociation, error)
    public static NetworkInterfaceNatRuleAssociation Get(string name, Input<string> id, NetworkInterfaceNatRuleAssociationState? state, CustomResourceOptions? opts = null)
    public static NetworkInterfaceNatRuleAssociation get(String name, Output<String> id, NetworkInterfaceNatRuleAssociationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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:
    IpConfigurationName string
    The Name of the IP Configuration within the Network Interface which should be connected to the NAT Rule. Changing this forces a new resource to be created.
    NatRuleId string
    The ID of the Load Balancer NAT Rule which this Network Interface which should be connected to. Changing this forces a new resource to be created.
    NetworkInterfaceId string
    The ID of the Network Interface. Changing this forces a new resource to be created.
    IpConfigurationName string
    The Name of the IP Configuration within the Network Interface which should be connected to the NAT Rule. Changing this forces a new resource to be created.
    NatRuleId string
    The ID of the Load Balancer NAT Rule which this Network Interface which should be connected to. Changing this forces a new resource to be created.
    NetworkInterfaceId string
    The ID of the Network Interface. Changing this forces a new resource to be created.
    ipConfigurationName String
    The Name of the IP Configuration within the Network Interface which should be connected to the NAT Rule. Changing this forces a new resource to be created.
    natRuleId String
    The ID of the Load Balancer NAT Rule which this Network Interface which should be connected to. Changing this forces a new resource to be created.
    networkInterfaceId String
    The ID of the Network Interface. Changing this forces a new resource to be created.
    ipConfigurationName string
    The Name of the IP Configuration within the Network Interface which should be connected to the NAT Rule. Changing this forces a new resource to be created.
    natRuleId string
    The ID of the Load Balancer NAT Rule which this Network Interface which should be connected to. Changing this forces a new resource to be created.
    networkInterfaceId string
    The ID of the Network Interface. Changing this forces a new resource to be created.
    ip_configuration_name str
    The Name of the IP Configuration within the Network Interface which should be connected to the NAT Rule. Changing this forces a new resource to be created.
    nat_rule_id str
    The ID of the Load Balancer NAT Rule which this Network Interface which should be connected to. Changing this forces a new resource to be created.
    network_interface_id str
    The ID of the Network Interface. Changing this forces a new resource to be created.
    ipConfigurationName String
    The Name of the IP Configuration within the Network Interface which should be connected to the NAT Rule. Changing this forces a new resource to be created.
    natRuleId String
    The ID of the Load Balancer NAT Rule which this Network Interface which should be connected to. Changing this forces a new resource to be created.
    networkInterfaceId String
    The ID of the Network Interface. Changing this forces a new resource to be created.

    Import

    Associations between Network Interfaces and Load Balancer NAT Rule can be imported using the resource id, e.g.

    $ pulumi import azure:network/networkInterfaceNatRuleAssociation:NetworkInterfaceNatRuleAssociation association1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/networkInterfaces/nic1/ipConfigurations/example|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi