azure-native.network.NatGateway

Explore with Pulumi AI

Nat Gateway resource. API Version: 2020-11-01.

Example Usage

Create nat gateway

using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var natGateway = new AzureNative.Network.NatGateway("natGateway", new()
    {
        Location = "westus",
        NatGatewayName = "test-natgateway",
        PublicIpAddresses = new[]
        {
            new AzureNative.Network.Inputs.SubResourceArgs
            {
                Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1",
            },
        },
        PublicIpPrefixes = new[]
        {
            new AzureNative.Network.Inputs.SubResourceArgs
            {
                Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1",
            },
        },
        ResourceGroupName = "rg1",
        Sku = new AzureNative.Network.Inputs.NatGatewaySkuArgs
        {
            Name = "Standard",
        },
    });

});
package main

import (
	network "github.com/pulumi/pulumi-azure-native/sdk/go/azure/network"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := network.NewNatGateway(ctx, "natGateway", &network.NatGatewayArgs{
			Location:       pulumi.String("westus"),
			NatGatewayName: pulumi.String("test-natgateway"),
			PublicIpAddresses: []network.SubResourceArgs{
				{
					Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1"),
				},
			},
			PublicIpPrefixes: []network.SubResourceArgs{
				{
					Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1"),
				},
			},
			ResourceGroupName: pulumi.String("rg1"),
			Sku: &network.NatGatewaySkuArgs{
				Name: pulumi.String("Standard"),
			},
		})
		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.azurenative.network.NatGateway;
import com.pulumi.azurenative.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 natGateway = new NatGateway("natGateway", NatGatewayArgs.builder()        
            .location("westus")
            .natGatewayName("test-natgateway")
            .publicIpAddresses(Map.of("id", "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1"))
            .publicIpPrefixes(Map.of("id", "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1"))
            .resourceGroupName("rg1")
            .sku(Map.of("name", "Standard"))
            .build());

    }
}
import pulumi
import pulumi_azure_native as azure_native

nat_gateway = azure_native.network.NatGateway("natGateway",
    location="westus",
    nat_gateway_name="test-natgateway",
    public_ip_addresses=[azure_native.network.SubResourceArgs(
        id="/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1",
    )],
    public_ip_prefixes=[azure_native.network.SubResourceArgs(
        id="/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1",
    )],
    resource_group_name="rg1",
    sku=azure_native.network.NatGatewaySkuArgs(
        name="Standard",
    ))
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const natGateway = new azure_native.network.NatGateway("natGateway", {
    location: "westus",
    natGatewayName: "test-natgateway",
    publicIpAddresses: [{
        id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1",
    }],
    publicIpPrefixes: [{
        id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1",
    }],
    resourceGroupName: "rg1",
    sku: {
        name: "Standard",
    },
});
resources:
  natGateway:
    type: azure-native:network:NatGateway
    properties:
      location: westus
      natGatewayName: test-natgateway
      publicIpAddresses:
        - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1
      publicIpPrefixes:
        - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1
      resourceGroupName: rg1
      sku:
        name: Standard

Create NatGateway Resource

new NatGateway(name: string, args: NatGatewayArgs, opts?: CustomResourceOptions);
@overload
def NatGateway(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               id: Optional[str] = None,
               idle_timeout_in_minutes: Optional[int] = None,
               location: Optional[str] = None,
               nat_gateway_name: Optional[str] = None,
               public_ip_addresses: Optional[Sequence[SubResourceArgs]] = None,
               public_ip_prefixes: Optional[Sequence[SubResourceArgs]] = None,
               resource_group_name: Optional[str] = None,
               sku: Optional[NatGatewaySkuArgs] = None,
               tags: Optional[Mapping[str, str]] = None,
               zones: Optional[Sequence[str]] = None)
@overload
def NatGateway(resource_name: str,
               args: NatGatewayInitArgs,
               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-native: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 NatGatewayInitArgs
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

The name of the resource group.

Id string

Resource ID.

IdleTimeoutInMinutes int

The idle timeout of the nat gateway.

Location string

Resource location.

NatGatewayName string

The name of the nat gateway.

PublicIpAddresses List<Pulumi.AzureNative.Network.Inputs.SubResourceArgs>

An array of public ip addresses associated with the nat gateway resource.

PublicIpPrefixes List<Pulumi.AzureNative.Network.Inputs.SubResourceArgs>

An array of public ip prefixes associated with the nat gateway resource.

Sku Pulumi.AzureNative.Network.Inputs.NatGatewaySkuArgs

The nat gateway SKU.

Tags Dictionary<string, string>

Resource tags.

Zones List<string>

A list of availability zones denoting the zone in which Nat Gateway should be deployed.

ResourceGroupName string

The name of the resource group.

Id string

Resource ID.

IdleTimeoutInMinutes int

The idle timeout of the nat gateway.

Location string

Resource location.

NatGatewayName string

The name of the nat gateway.

PublicIpAddresses []SubResourceArgs

An array of public ip addresses associated with the nat gateway resource.

PublicIpPrefixes []SubResourceArgs

An array of public ip prefixes associated with the nat gateway resource.

Sku NatGatewaySkuArgs

The nat gateway SKU.

Tags map[string]string

Resource tags.

Zones []string

A list of availability zones denoting the zone in which Nat Gateway should be deployed.

resourceGroupName String

The name of the resource group.

id String

Resource ID.

idleTimeoutInMinutes Integer

The idle timeout of the nat gateway.

location String

Resource location.

natGatewayName String

The name of the nat gateway.

publicIpAddresses List<SubResourceArgs>

An array of public ip addresses associated with the nat gateway resource.

publicIpPrefixes List<SubResourceArgs>

An array of public ip prefixes associated with the nat gateway resource.

sku NatGatewaySkuArgs

The nat gateway SKU.

tags Map<String,String>

Resource tags.

zones List<String>

A list of availability zones denoting the zone in which Nat Gateway should be deployed.

resourceGroupName string

The name of the resource group.

id string

Resource ID.

idleTimeoutInMinutes number

The idle timeout of the nat gateway.

location string

Resource location.

natGatewayName string

The name of the nat gateway.

publicIpAddresses SubResourceArgs[]

An array of public ip addresses associated with the nat gateway resource.

publicIpPrefixes SubResourceArgs[]

An array of public ip prefixes associated with the nat gateway resource.

sku NatGatewaySkuArgs

The nat gateway SKU.

tags {[key: string]: string}

Resource tags.

zones string[]

A list of availability zones denoting the zone in which Nat Gateway should be deployed.

resource_group_name str

The name of the resource group.

id str

Resource ID.

idle_timeout_in_minutes int

The idle timeout of the nat gateway.

location str

Resource location.

nat_gateway_name str

The name of the nat gateway.

public_ip_addresses Sequence[SubResourceArgs]

An array of public ip addresses associated with the nat gateway resource.

public_ip_prefixes Sequence[SubResourceArgs]

An array of public ip prefixes associated with the nat gateway resource.

sku NatGatewaySkuArgs

The nat gateway SKU.

tags Mapping[str, str]

Resource tags.

zones Sequence[str]

A list of availability zones denoting the zone in which Nat Gateway should be deployed.

resourceGroupName String

The name of the resource group.

id String

Resource ID.

idleTimeoutInMinutes Number

The idle timeout of the nat gateway.

location String

Resource location.

natGatewayName String

The name of the nat gateway.

publicIpAddresses List<Property Map>

An array of public ip addresses associated with the nat gateway resource.

publicIpPrefixes List<Property Map>

An array of public ip prefixes associated with the nat gateway resource.

sku Property Map

The nat gateway SKU.

tags Map<String>

Resource tags.

zones List<String>

A list of availability zones denoting the zone in which Nat Gateway should be deployed.

Outputs

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

Etag string

A unique read-only string that changes whenever the resource is updated.

Id string

The provider-assigned unique ID for this managed resource.

Name string

Resource name.

ProvisioningState string

The provisioning state of the NAT gateway resource.

ResourceGuid string

The resource GUID property of the NAT gateway resource.

Subnets List<Pulumi.AzureNative.Network.Outputs.SubResourceResponse>

An array of references to the subnets using this nat gateway resource.

Type string

Resource type.

Etag string

A unique read-only string that changes whenever the resource is updated.

Id string

The provider-assigned unique ID for this managed resource.

Name string

Resource name.

ProvisioningState string

The provisioning state of the NAT gateway resource.

ResourceGuid string

The resource GUID property of the NAT gateway resource.

Subnets []SubResourceResponse

An array of references to the subnets using this nat gateway resource.

Type string

Resource type.

etag String

A unique read-only string that changes whenever the resource is updated.

id String

The provider-assigned unique ID for this managed resource.

name String

Resource name.

provisioningState String

The provisioning state of the NAT gateway resource.

resourceGuid String

The resource GUID property of the NAT gateway resource.

subnets List<SubResourceResponse>

An array of references to the subnets using this nat gateway resource.

type String

Resource type.

etag string

A unique read-only string that changes whenever the resource is updated.

id string

The provider-assigned unique ID for this managed resource.

name string

Resource name.

provisioningState string

The provisioning state of the NAT gateway resource.

resourceGuid string

The resource GUID property of the NAT gateway resource.

subnets SubResourceResponse[]

An array of references to the subnets using this nat gateway resource.

type string

Resource type.

etag str

A unique read-only string that changes whenever the resource is updated.

id str

The provider-assigned unique ID for this managed resource.

name str

Resource name.

provisioning_state str

The provisioning state of the NAT gateway resource.

resource_guid str

The resource GUID property of the NAT gateway resource.

subnets Sequence[SubResourceResponse]

An array of references to the subnets using this nat gateway resource.

type str

Resource type.

etag String

A unique read-only string that changes whenever the resource is updated.

id String

The provider-assigned unique ID for this managed resource.

name String

Resource name.

provisioningState String

The provisioning state of the NAT gateway resource.

resourceGuid String

The resource GUID property of the NAT gateway resource.

subnets List<Property Map>

An array of references to the subnets using this nat gateway resource.

type String

Resource type.

Supporting Types

NatGatewaySku

Name string | Pulumi.AzureNative.Network.NatGatewaySkuName

Name of Nat Gateway SKU.

Name string | NatGatewaySkuName

Name of Nat Gateway SKU.

name String | NatGatewaySkuName

Name of Nat Gateway SKU.

name string | NatGatewaySkuName

Name of Nat Gateway SKU.

name str | NatGatewaySkuName

Name of Nat Gateway SKU.

name String | "Standard"

Name of Nat Gateway SKU.

NatGatewaySkuName

Standard
Standard
NatGatewaySkuNameStandard
Standard
Standard
Standard
Standard
Standard
STANDARD
Standard
"Standard"
Standard

NatGatewaySkuResponse

Name string

Name of Nat Gateway SKU.

Name string

Name of Nat Gateway SKU.

name String

Name of Nat Gateway SKU.

name string

Name of Nat Gateway SKU.

name str

Name of Nat Gateway SKU.

name String

Name of Nat Gateway SKU.

SubResource

Id string

Resource Id.

Id string

Resource Id.

id String

Resource Id.

id string

Resource Id.

id str

Resource Id.

id String

Resource Id.

SubResourceResponse

Id string

Resource ID.

Id string

Resource ID.

id String

Resource ID.

id string

Resource ID.

id str

Resource ID.

id String

Resource ID.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:network:NatGateway test-natGateway /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/natGateways/test-natGateway 

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0