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

We recommend using Azure Native.

Azure Classic v5.58.0 published on Saturday, Dec 2, 2023 by Pulumi

azure.network.NatGateway

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.58.0 published on Saturday, Dec 2, 2023 by Pulumi

    Manages an Azure NAT Gateway.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
        {
            Location = "West Europe",
        });
    
        var exampleNatGateway = new Azure.Network.NatGateway("exampleNatGateway", new()
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            SkuName = "Standard",
            IdleTimeoutInMinutes = 10,
            Zones = new[]
            {
                "1",
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"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 {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = network.NewNatGateway(ctx, "exampleNatGateway", &network.NatGatewayArgs{
    			Location:             exampleResourceGroup.Location,
    			ResourceGroupName:    exampleResourceGroup.Name,
    			SkuName:              pulumi.String("Standard"),
    			IdleTimeoutInMinutes: pulumi.Int(10),
    			Zones: pulumi.StringArray{
    				pulumi.String("1"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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.NatGateway;
    import com.pulumi.azure.network.NatGatewayArgs;
    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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
                .location("West Europe")
                .build());
    
            var exampleNatGateway = new NatGateway("exampleNatGateway", NatGatewayArgs.builder()        
                .location(exampleResourceGroup.location())
                .resourceGroupName(exampleResourceGroup.name())
                .skuName("Standard")
                .idleTimeoutInMinutes(10)
                .zones("1")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_nat_gateway = azure.network.NatGateway("exampleNatGateway",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        sku_name="Standard",
        idle_timeout_in_minutes=10,
        zones=["1"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleNatGateway = new azure.network.NatGateway("exampleNatGateway", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        skuName: "Standard",
        idleTimeoutInMinutes: 10,
        zones: ["1"],
    });
    
    resources:
      exampleResourceGroup:
        type: azure:core:ResourceGroup
        properties:
          location: West Europe
      exampleNatGateway:
        type: azure:network:NatGateway
        properties:
          location: ${exampleResourceGroup.location}
          resourceGroupName: ${exampleResourceGroup.name}
          skuName: Standard
          idleTimeoutInMinutes: 10
          zones:
            - '1'
    

    Create NatGateway Resource

    new NatGateway(name: string, args: NatGatewayArgs, opts?: CustomResourceOptions);
    @overload
    def NatGateway(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   idle_timeout_in_minutes: Optional[int] = None,
                   location: Optional[str] = None,
                   name: Optional[str] = None,
                   resource_group_name: Optional[str] = None,
                   sku_name: Optional[str] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   zones: Optional[Sequence[str]] = None)
    @overload
    def NatGateway(resource_name: str,
                   args: NatGatewayArgs,
                   opts: Optional[ResourceOptions] = None)
    func NewNatGateway(ctx *Context, name string, args NatGatewayArgs, opts ...ResourceOption) (*NatGateway, error)
    public NatGateway(string name, NatGatewayArgs args, CustomResourceOptions? opts = null)
    public NatGateway(String name, NatGatewayArgs args)
    public NatGateway(String name, NatGatewayArgs args, CustomResourceOptions options)
    
    type: azure:network:NatGateway
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args NatGatewayArgs
    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 NatGatewayArgs
    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 NatGatewayArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NatGatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NatGatewayArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    NatGateway 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 NatGateway resource accepts the following input properties:

    ResourceGroupName string

    Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created.

    IdleTimeoutInMinutes int

    The idle timeout which should be used in minutes. Defaults to 4.

    Location string

    Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created.

    Name string

    Specifies the name of the NAT Gateway. Changing this forces a new resource to be created.

    SkuName string

    The SKU which should be used. At this time the only supported value is Standard. Defaults to Standard.

    Tags Dictionary<string, string>

    A mapping of tags to assign to the resource.

    Zones List<string>

    A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created.

    NOTE: Only one Availability Zone can be defined. For more information, please check out the Azure documentation

    ResourceGroupName string

    Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created.

    IdleTimeoutInMinutes int

    The idle timeout which should be used in minutes. Defaults to 4.

    Location string

    Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created.

    Name string

    Specifies the name of the NAT Gateway. Changing this forces a new resource to be created.

    SkuName string

    The SKU which should be used. At this time the only supported value is Standard. Defaults to Standard.

    Tags map[string]string

    A mapping of tags to assign to the resource.

    Zones []string

    A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created.

    NOTE: Only one Availability Zone can be defined. For more information, please check out the Azure documentation

    resourceGroupName String

    Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created.

    idleTimeoutInMinutes Integer

    The idle timeout which should be used in minutes. Defaults to 4.

    location String

    Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created.

    name String

    Specifies the name of the NAT Gateway. Changing this forces a new resource to be created.

    skuName String

    The SKU which should be used. At this time the only supported value is Standard. Defaults to Standard.

    tags Map<String,String>

    A mapping of tags to assign to the resource.

    zones List<String>

    A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created.

    NOTE: Only one Availability Zone can be defined. For more information, please check out the Azure documentation

    resourceGroupName string

    Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created.

    idleTimeoutInMinutes number

    The idle timeout which should be used in minutes. Defaults to 4.

    location string

    Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created.

    name string

    Specifies the name of the NAT Gateway. Changing this forces a new resource to be created.

    skuName string

    The SKU which should be used. At this time the only supported value is Standard. Defaults to Standard.

    tags {[key: string]: string}

    A mapping of tags to assign to the resource.

    zones string[]

    A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created.

    NOTE: Only one Availability Zone can be defined. For more information, please check out the Azure documentation

    resource_group_name str

    Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created.

    idle_timeout_in_minutes int

    The idle timeout which should be used in minutes. Defaults to 4.

    location str

    Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created.

    name str

    Specifies the name of the NAT Gateway. Changing this forces a new resource to be created.

    sku_name str

    The SKU which should be used. At this time the only supported value is Standard. Defaults to Standard.

    tags Mapping[str, str]

    A mapping of tags to assign to the resource.

    zones Sequence[str]

    A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created.

    NOTE: Only one Availability Zone can be defined. For more information, please check out the Azure documentation

    resourceGroupName String

    Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created.

    idleTimeoutInMinutes Number

    The idle timeout which should be used in minutes. Defaults to 4.

    location String

    Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created.

    name String

    Specifies the name of the NAT Gateway. Changing this forces a new resource to be created.

    skuName String

    The SKU which should be used. At this time the only supported value is Standard. Defaults to Standard.

    tags Map<String>

    A mapping of tags to assign to the resource.

    zones List<String>

    A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created.

    NOTE: Only one Availability Zone can be defined. For more information, please check out the Azure documentation

    Outputs

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

    Id string

    The provider-assigned unique ID for this managed resource.

    ResourceGuid string

    The resource GUID property of the NAT Gateway.

    Id string

    The provider-assigned unique ID for this managed resource.

    ResourceGuid string

    The resource GUID property of the NAT Gateway.

    id String

    The provider-assigned unique ID for this managed resource.

    resourceGuid String

    The resource GUID property of the NAT Gateway.

    id string

    The provider-assigned unique ID for this managed resource.

    resourceGuid string

    The resource GUID property of the NAT Gateway.

    id str

    The provider-assigned unique ID for this managed resource.

    resource_guid str

    The resource GUID property of the NAT Gateway.

    id String

    The provider-assigned unique ID for this managed resource.

    resourceGuid String

    The resource GUID property of the NAT Gateway.

    Look up Existing NatGateway Resource

    Get an existing NatGateway 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?: NatGatewayState, opts?: CustomResourceOptions): NatGateway
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            idle_timeout_in_minutes: Optional[int] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            resource_guid: Optional[str] = None,
            sku_name: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            zones: Optional[Sequence[str]] = None) -> NatGateway
    func GetNatGateway(ctx *Context, name string, id IDInput, state *NatGatewayState, opts ...ResourceOption) (*NatGateway, error)
    public static NatGateway Get(string name, Input<string> id, NatGatewayState? state, CustomResourceOptions? opts = null)
    public static NatGateway get(String name, Output<String> id, NatGatewayState 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:
    IdleTimeoutInMinutes int

    The idle timeout which should be used in minutes. Defaults to 4.

    Location string

    Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created.

    Name string

    Specifies the name of the NAT Gateway. Changing this forces a new resource to be created.

    ResourceGroupName string

    Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created.

    ResourceGuid string

    The resource GUID property of the NAT Gateway.

    SkuName string

    The SKU which should be used. At this time the only supported value is Standard. Defaults to Standard.

    Tags Dictionary<string, string>

    A mapping of tags to assign to the resource.

    Zones List<string>

    A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created.

    NOTE: Only one Availability Zone can be defined. For more information, please check out the Azure documentation

    IdleTimeoutInMinutes int

    The idle timeout which should be used in minutes. Defaults to 4.

    Location string

    Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created.

    Name string

    Specifies the name of the NAT Gateway. Changing this forces a new resource to be created.

    ResourceGroupName string

    Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created.

    ResourceGuid string

    The resource GUID property of the NAT Gateway.

    SkuName string

    The SKU which should be used. At this time the only supported value is Standard. Defaults to Standard.

    Tags map[string]string

    A mapping of tags to assign to the resource.

    Zones []string

    A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created.

    NOTE: Only one Availability Zone can be defined. For more information, please check out the Azure documentation

    idleTimeoutInMinutes Integer

    The idle timeout which should be used in minutes. Defaults to 4.

    location String

    Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created.

    name String

    Specifies the name of the NAT Gateway. Changing this forces a new resource to be created.

    resourceGroupName String

    Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created.

    resourceGuid String

    The resource GUID property of the NAT Gateway.

    skuName String

    The SKU which should be used. At this time the only supported value is Standard. Defaults to Standard.

    tags Map<String,String>

    A mapping of tags to assign to the resource.

    zones List<String>

    A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created.

    NOTE: Only one Availability Zone can be defined. For more information, please check out the Azure documentation

    idleTimeoutInMinutes number

    The idle timeout which should be used in minutes. Defaults to 4.

    location string

    Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created.

    name string

    Specifies the name of the NAT Gateway. Changing this forces a new resource to be created.

    resourceGroupName string

    Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created.

    resourceGuid string

    The resource GUID property of the NAT Gateway.

    skuName string

    The SKU which should be used. At this time the only supported value is Standard. Defaults to Standard.

    tags {[key: string]: string}

    A mapping of tags to assign to the resource.

    zones string[]

    A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created.

    NOTE: Only one Availability Zone can be defined. For more information, please check out the Azure documentation

    idle_timeout_in_minutes int

    The idle timeout which should be used in minutes. Defaults to 4.

    location str

    Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created.

    name str

    Specifies the name of the NAT Gateway. Changing this forces a new resource to be created.

    resource_group_name str

    Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created.

    resource_guid str

    The resource GUID property of the NAT Gateway.

    sku_name str

    The SKU which should be used. At this time the only supported value is Standard. Defaults to Standard.

    tags Mapping[str, str]

    A mapping of tags to assign to the resource.

    zones Sequence[str]

    A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created.

    NOTE: Only one Availability Zone can be defined. For more information, please check out the Azure documentation

    idleTimeoutInMinutes Number

    The idle timeout which should be used in minutes. Defaults to 4.

    location String

    Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created.

    name String

    Specifies the name of the NAT Gateway. Changing this forces a new resource to be created.

    resourceGroupName String

    Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created.

    resourceGuid String

    The resource GUID property of the NAT Gateway.

    skuName String

    The SKU which should be used. At this time the only supported value is Standard. Defaults to Standard.

    tags Map<String>

    A mapping of tags to assign to the resource.

    zones List<String>

    A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created.

    NOTE: Only one Availability Zone can be defined. For more information, please check out the Azure documentation

    Import

    NAT Gateway can be imported using the resource id, e.g.

     $ pulumi import azure:network/natGateway:NatGateway test /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/natGateways/gateway1
    

    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.58.0 published on Saturday, Dec 2, 2023 by Pulumi