flexibleengine.NatGatewayV2
Explore with Pulumi AI
Manages a V2 nat gateway resource within FlexibleEngine.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const exampleVpc = new flexibleengine.VpcV1("exampleVpc", {cidr: "192.168.0.0/16"});
const exampleSubnet = new flexibleengine.VpcSubnetV1("exampleSubnet", {
cidr: "192.168.0.0/24",
gatewayIp: "192.168.0.1",
vpcId: exampleVpc.vpcV1Id,
});
const nat1 = new flexibleengine.NatGatewayV2("nat1", {
description: "test for terraform",
spec: "3",
vpcId: exampleVpc.vpcV1Id,
subnetId: exampleSubnet.vpcSubnetV1Id,
});
import pulumi
import pulumi_flexibleengine as flexibleengine
example_vpc = flexibleengine.VpcV1("exampleVpc", cidr="192.168.0.0/16")
example_subnet = flexibleengine.VpcSubnetV1("exampleSubnet",
cidr="192.168.0.0/24",
gateway_ip="192.168.0.1",
vpc_id=example_vpc.vpc_v1_id)
nat1 = flexibleengine.NatGatewayV2("nat1",
description="test for terraform",
spec="3",
vpc_id=example_vpc.vpc_v1_id,
subnet_id=example_subnet.vpc_subnet_v1_id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleVpc, err := flexibleengine.NewVpcV1(ctx, "exampleVpc", &flexibleengine.VpcV1Args{
Cidr: pulumi.String("192.168.0.0/16"),
})
if err != nil {
return err
}
exampleSubnet, err := flexibleengine.NewVpcSubnetV1(ctx, "exampleSubnet", &flexibleengine.VpcSubnetV1Args{
Cidr: pulumi.String("192.168.0.0/24"),
GatewayIp: pulumi.String("192.168.0.1"),
VpcId: exampleVpc.VpcV1Id,
})
if err != nil {
return err
}
_, err = flexibleengine.NewNatGatewayV2(ctx, "nat1", &flexibleengine.NatGatewayV2Args{
Description: pulumi.String("test for terraform"),
Spec: pulumi.String("3"),
VpcId: exampleVpc.VpcV1Id,
SubnetId: exampleSubnet.VpcSubnetV1Id,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var exampleVpc = new Flexibleengine.VpcV1("exampleVpc", new()
{
Cidr = "192.168.0.0/16",
});
var exampleSubnet = new Flexibleengine.VpcSubnetV1("exampleSubnet", new()
{
Cidr = "192.168.0.0/24",
GatewayIp = "192.168.0.1",
VpcId = exampleVpc.VpcV1Id,
});
var nat1 = new Flexibleengine.NatGatewayV2("nat1", new()
{
Description = "test for terraform",
Spec = "3",
VpcId = exampleVpc.VpcV1Id,
SubnetId = exampleSubnet.VpcSubnetV1Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.VpcV1;
import com.pulumi.flexibleengine.VpcV1Args;
import com.pulumi.flexibleengine.VpcSubnetV1;
import com.pulumi.flexibleengine.VpcSubnetV1Args;
import com.pulumi.flexibleengine.NatGatewayV2;
import com.pulumi.flexibleengine.NatGatewayV2Args;
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 exampleVpc = new VpcV1("exampleVpc", VpcV1Args.builder()
.cidr("192.168.0.0/16")
.build());
var exampleSubnet = new VpcSubnetV1("exampleSubnet", VpcSubnetV1Args.builder()
.cidr("192.168.0.0/24")
.gatewayIp("192.168.0.1")
.vpcId(exampleVpc.vpcV1Id())
.build());
var nat1 = new NatGatewayV2("nat1", NatGatewayV2Args.builder()
.description("test for terraform")
.spec("3")
.vpcId(exampleVpc.vpcV1Id())
.subnetId(exampleSubnet.vpcSubnetV1Id())
.build());
}
}
resources:
exampleVpc:
type: flexibleengine:VpcV1
properties:
cidr: 192.168.0.0/16
exampleSubnet:
type: flexibleengine:VpcSubnetV1
properties:
cidr: 192.168.0.0/24
gatewayIp: 192.168.0.1
vpcId: ${exampleVpc.vpcV1Id}
nat1:
type: flexibleengine:NatGatewayV2
properties:
description: test for terraform
spec: '3'
vpcId: ${exampleVpc.vpcV1Id}
subnetId: ${exampleSubnet.vpcSubnetV1Id}
Create NatGatewayV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NatGatewayV2(name: string, args: NatGatewayV2Args, opts?: CustomResourceOptions);
@overload
def NatGatewayV2(resource_name: str,
args: NatGatewayV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def NatGatewayV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
spec: Optional[str] = None,
description: Optional[str] = None,
internal_network_id: Optional[str] = None,
name: Optional[str] = None,
nat_gateway_v2_id: Optional[str] = None,
region: Optional[str] = None,
router_id: Optional[str] = None,
subnet_id: Optional[str] = None,
tenant_id: Optional[str] = None,
timeouts: Optional[NatGatewayV2TimeoutsArgs] = None,
vpc_id: Optional[str] = None)
func NewNatGatewayV2(ctx *Context, name string, args NatGatewayV2Args, opts ...ResourceOption) (*NatGatewayV2, error)
public NatGatewayV2(string name, NatGatewayV2Args args, CustomResourceOptions? opts = null)
public NatGatewayV2(String name, NatGatewayV2Args args)
public NatGatewayV2(String name, NatGatewayV2Args args, CustomResourceOptions options)
type: flexibleengine:NatGatewayV2
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 NatGatewayV2Args
- 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 NatGatewayV2Args
- 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 NatGatewayV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NatGatewayV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NatGatewayV2Args
- 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 natGatewayV2Resource = new Flexibleengine.NatGatewayV2("natGatewayV2Resource", new()
{
Spec = "string",
Description = "string",
Name = "string",
NatGatewayV2Id = "string",
Region = "string",
SubnetId = "string",
Timeouts = new Flexibleengine.Inputs.NatGatewayV2TimeoutsArgs
{
Create = "string",
Delete = "string",
},
VpcId = "string",
});
example, err := flexibleengine.NewNatGatewayV2(ctx, "natGatewayV2Resource", &flexibleengine.NatGatewayV2Args{
Spec: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
NatGatewayV2Id: pulumi.String("string"),
Region: pulumi.String("string"),
SubnetId: pulumi.String("string"),
Timeouts: &flexibleengine.NatGatewayV2TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
VpcId: pulumi.String("string"),
})
var natGatewayV2Resource = new NatGatewayV2("natGatewayV2Resource", NatGatewayV2Args.builder()
.spec("string")
.description("string")
.name("string")
.natGatewayV2Id("string")
.region("string")
.subnetId("string")
.timeouts(NatGatewayV2TimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.vpcId("string")
.build());
nat_gateway_v2_resource = flexibleengine.NatGatewayV2("natGatewayV2Resource",
spec="string",
description="string",
name="string",
nat_gateway_v2_id="string",
region="string",
subnet_id="string",
timeouts={
"create": "string",
"delete": "string",
},
vpc_id="string")
const natGatewayV2Resource = new flexibleengine.NatGatewayV2("natGatewayV2Resource", {
spec: "string",
description: "string",
name: "string",
natGatewayV2Id: "string",
region: "string",
subnetId: "string",
timeouts: {
create: "string",
"delete": "string",
},
vpcId: "string",
});
type: flexibleengine:NatGatewayV2
properties:
description: string
name: string
natGatewayV2Id: string
region: string
spec: string
subnetId: string
timeouts:
create: string
delete: string
vpcId: string
NatGatewayV2 Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The NatGatewayV2 resource accepts the following input properties:
- Spec string
- Specifies the nat gateway type. The value can be:
- Description string
- Specifies the description of the nat gateway. The value contains 0 to 255 characters, and angle brackets (<) and (>) are not allowed.
- Internal
Network stringId - Name string
- Specifies the nat gateway name. The name can contain only digits, letters, underscores (_), and hyphens(-).
- Nat
Gateway stringV2Id - The resource ID in UUID format.
- Region string
- Specifies the region in which to create the Nat gateway resource. If omitted, the provider-level region will be used. Changing this creates a new nat gateway.
- Router
Id string - Subnet
Id string - Specifies the ID of the VPC Subnet of the downstream interface (the next hop of the DVR) of the NAT gateway. Changing this creates a new nat gateway.
- Tenant
Id string - Timeouts
Nat
Gateway V2Timeouts - Vpc
Id string - Specifies the ID of the VPC this nat gateway belongs to. Changing this creates a new nat gateway.
- Spec string
- Specifies the nat gateway type. The value can be:
- Description string
- Specifies the description of the nat gateway. The value contains 0 to 255 characters, and angle brackets (<) and (>) are not allowed.
- Internal
Network stringId - Name string
- Specifies the nat gateway name. The name can contain only digits, letters, underscores (_), and hyphens(-).
- Nat
Gateway stringV2Id - The resource ID in UUID format.
- Region string
- Specifies the region in which to create the Nat gateway resource. If omitted, the provider-level region will be used. Changing this creates a new nat gateway.
- Router
Id string - Subnet
Id string - Specifies the ID of the VPC Subnet of the downstream interface (the next hop of the DVR) of the NAT gateway. Changing this creates a new nat gateway.
- Tenant
Id string - Timeouts
Nat
Gateway V2Timeouts Args - Vpc
Id string - Specifies the ID of the VPC this nat gateway belongs to. Changing this creates a new nat gateway.
- spec String
- Specifies the nat gateway type. The value can be:
- description String
- Specifies the description of the nat gateway. The value contains 0 to 255 characters, and angle brackets (<) and (>) are not allowed.
- internal
Network StringId - name String
- Specifies the nat gateway name. The name can contain only digits, letters, underscores (_), and hyphens(-).
- nat
Gateway StringV2Id - The resource ID in UUID format.
- region String
- Specifies the region in which to create the Nat gateway resource. If omitted, the provider-level region will be used. Changing this creates a new nat gateway.
- router
Id String - subnet
Id String - Specifies the ID of the VPC Subnet of the downstream interface (the next hop of the DVR) of the NAT gateway. Changing this creates a new nat gateway.
- tenant
Id String - timeouts
Nat
Gateway V2Timeouts - vpc
Id String - Specifies the ID of the VPC this nat gateway belongs to. Changing this creates a new nat gateway.
- spec string
- Specifies the nat gateway type. The value can be:
- description string
- Specifies the description of the nat gateway. The value contains 0 to 255 characters, and angle brackets (<) and (>) are not allowed.
- internal
Network stringId - name string
- Specifies the nat gateway name. The name can contain only digits, letters, underscores (_), and hyphens(-).
- nat
Gateway stringV2Id - The resource ID in UUID format.
- region string
- Specifies the region in which to create the Nat gateway resource. If omitted, the provider-level region will be used. Changing this creates a new nat gateway.
- router
Id string - subnet
Id string - Specifies the ID of the VPC Subnet of the downstream interface (the next hop of the DVR) of the NAT gateway. Changing this creates a new nat gateway.
- tenant
Id string - timeouts
Nat
Gateway V2Timeouts - vpc
Id string - Specifies the ID of the VPC this nat gateway belongs to. Changing this creates a new nat gateway.
- spec str
- Specifies the nat gateway type. The value can be:
- description str
- Specifies the description of the nat gateway. The value contains 0 to 255 characters, and angle brackets (<) and (>) are not allowed.
- internal_
network_ strid - name str
- Specifies the nat gateway name. The name can contain only digits, letters, underscores (_), and hyphens(-).
- nat_
gateway_ strv2_ id - The resource ID in UUID format.
- region str
- Specifies the region in which to create the Nat gateway resource. If omitted, the provider-level region will be used. Changing this creates a new nat gateway.
- router_
id str - subnet_
id str - Specifies the ID of the VPC Subnet of the downstream interface (the next hop of the DVR) of the NAT gateway. Changing this creates a new nat gateway.
- tenant_
id str - timeouts
Nat
Gateway V2Timeouts Args - vpc_
id str - Specifies the ID of the VPC this nat gateway belongs to. Changing this creates a new nat gateway.
- spec String
- Specifies the nat gateway type. The value can be:
- description String
- Specifies the description of the nat gateway. The value contains 0 to 255 characters, and angle brackets (<) and (>) are not allowed.
- internal
Network StringId - name String
- Specifies the nat gateway name. The name can contain only digits, letters, underscores (_), and hyphens(-).
- nat
Gateway StringV2Id - The resource ID in UUID format.
- region String
- Specifies the region in which to create the Nat gateway resource. If omitted, the provider-level region will be used. Changing this creates a new nat gateway.
- router
Id String - subnet
Id String - Specifies the ID of the VPC Subnet of the downstream interface (the next hop of the DVR) of the NAT gateway. Changing this creates a new nat gateway.
- tenant
Id String - timeouts Property Map
- vpc
Id String - Specifies the ID of the VPC this nat gateway belongs to. Changing this creates a new nat gateway.
Outputs
All input properties are implicitly available as output properties. Additionally, the NatGatewayV2 resource produces the following output properties:
Look up Existing NatGatewayV2 Resource
Get an existing NatGatewayV2 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?: NatGatewayV2State, opts?: CustomResourceOptions): NatGatewayV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
internal_network_id: Optional[str] = None,
name: Optional[str] = None,
nat_gateway_v2_id: Optional[str] = None,
region: Optional[str] = None,
router_id: Optional[str] = None,
spec: Optional[str] = None,
status: Optional[str] = None,
subnet_id: Optional[str] = None,
tenant_id: Optional[str] = None,
timeouts: Optional[NatGatewayV2TimeoutsArgs] = None,
vpc_id: Optional[str] = None) -> NatGatewayV2
func GetNatGatewayV2(ctx *Context, name string, id IDInput, state *NatGatewayV2State, opts ...ResourceOption) (*NatGatewayV2, error)
public static NatGatewayV2 Get(string name, Input<string> id, NatGatewayV2State? state, CustomResourceOptions? opts = null)
public static NatGatewayV2 get(String name, Output<String> id, NatGatewayV2State state, CustomResourceOptions options)
resources: _: type: flexibleengine:NatGatewayV2 get: id: ${id}
- 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.
- Description string
- Specifies the description of the nat gateway. The value contains 0 to 255 characters, and angle brackets (<) and (>) are not allowed.
- Internal
Network stringId - Name string
- Specifies the nat gateway name. The name can contain only digits, letters, underscores (_), and hyphens(-).
- Nat
Gateway stringV2Id - The resource ID in UUID format.
- Region string
- Specifies the region in which to create the Nat gateway resource. If omitted, the provider-level region will be used. Changing this creates a new nat gateway.
- Router
Id string - Spec string
- Specifies the nat gateway type. The value can be:
- Status string
- The status of the nat gateway.
- Subnet
Id string - Specifies the ID of the VPC Subnet of the downstream interface (the next hop of the DVR) of the NAT gateway. Changing this creates a new nat gateway.
- Tenant
Id string - Timeouts
Nat
Gateway V2Timeouts - Vpc
Id string - Specifies the ID of the VPC this nat gateway belongs to. Changing this creates a new nat gateway.
- Description string
- Specifies the description of the nat gateway. The value contains 0 to 255 characters, and angle brackets (<) and (>) are not allowed.
- Internal
Network stringId - Name string
- Specifies the nat gateway name. The name can contain only digits, letters, underscores (_), and hyphens(-).
- Nat
Gateway stringV2Id - The resource ID in UUID format.
- Region string
- Specifies the region in which to create the Nat gateway resource. If omitted, the provider-level region will be used. Changing this creates a new nat gateway.
- Router
Id string - Spec string
- Specifies the nat gateway type. The value can be:
- Status string
- The status of the nat gateway.
- Subnet
Id string - Specifies the ID of the VPC Subnet of the downstream interface (the next hop of the DVR) of the NAT gateway. Changing this creates a new nat gateway.
- Tenant
Id string - Timeouts
Nat
Gateway V2Timeouts Args - Vpc
Id string - Specifies the ID of the VPC this nat gateway belongs to. Changing this creates a new nat gateway.
- description String
- Specifies the description of the nat gateway. The value contains 0 to 255 characters, and angle brackets (<) and (>) are not allowed.
- internal
Network StringId - name String
- Specifies the nat gateway name. The name can contain only digits, letters, underscores (_), and hyphens(-).
- nat
Gateway StringV2Id - The resource ID in UUID format.
- region String
- Specifies the region in which to create the Nat gateway resource. If omitted, the provider-level region will be used. Changing this creates a new nat gateway.
- router
Id String - spec String
- Specifies the nat gateway type. The value can be:
- status String
- The status of the nat gateway.
- subnet
Id String - Specifies the ID of the VPC Subnet of the downstream interface (the next hop of the DVR) of the NAT gateway. Changing this creates a new nat gateway.
- tenant
Id String - timeouts
Nat
Gateway V2Timeouts - vpc
Id String - Specifies the ID of the VPC this nat gateway belongs to. Changing this creates a new nat gateway.
- description string
- Specifies the description of the nat gateway. The value contains 0 to 255 characters, and angle brackets (<) and (>) are not allowed.
- internal
Network stringId - name string
- Specifies the nat gateway name. The name can contain only digits, letters, underscores (_), and hyphens(-).
- nat
Gateway stringV2Id - The resource ID in UUID format.
- region string
- Specifies the region in which to create the Nat gateway resource. If omitted, the provider-level region will be used. Changing this creates a new nat gateway.
- router
Id string - spec string
- Specifies the nat gateway type. The value can be:
- status string
- The status of the nat gateway.
- subnet
Id string - Specifies the ID of the VPC Subnet of the downstream interface (the next hop of the DVR) of the NAT gateway. Changing this creates a new nat gateway.
- tenant
Id string - timeouts
Nat
Gateway V2Timeouts - vpc
Id string - Specifies the ID of the VPC this nat gateway belongs to. Changing this creates a new nat gateway.
- description str
- Specifies the description of the nat gateway. The value contains 0 to 255 characters, and angle brackets (<) and (>) are not allowed.
- internal_
network_ strid - name str
- Specifies the nat gateway name. The name can contain only digits, letters, underscores (_), and hyphens(-).
- nat_
gateway_ strv2_ id - The resource ID in UUID format.
- region str
- Specifies the region in which to create the Nat gateway resource. If omitted, the provider-level region will be used. Changing this creates a new nat gateway.
- router_
id str - spec str
- Specifies the nat gateway type. The value can be:
- status str
- The status of the nat gateway.
- subnet_
id str - Specifies the ID of the VPC Subnet of the downstream interface (the next hop of the DVR) of the NAT gateway. Changing this creates a new nat gateway.
- tenant_
id str - timeouts
Nat
Gateway V2Timeouts Args - vpc_
id str - Specifies the ID of the VPC this nat gateway belongs to. Changing this creates a new nat gateway.
- description String
- Specifies the description of the nat gateway. The value contains 0 to 255 characters, and angle brackets (<) and (>) are not allowed.
- internal
Network StringId - name String
- Specifies the nat gateway name. The name can contain only digits, letters, underscores (_), and hyphens(-).
- nat
Gateway StringV2Id - The resource ID in UUID format.
- region String
- Specifies the region in which to create the Nat gateway resource. If omitted, the provider-level region will be used. Changing this creates a new nat gateway.
- router
Id String - spec String
- Specifies the nat gateway type. The value can be:
- status String
- The status of the nat gateway.
- subnet
Id String - Specifies the ID of the VPC Subnet of the downstream interface (the next hop of the DVR) of the NAT gateway. Changing this creates a new nat gateway.
- tenant
Id String - timeouts Property Map
- vpc
Id String - Specifies the ID of the VPC this nat gateway belongs to. Changing this creates a new nat gateway.
Supporting Types
NatGatewayV2Timeouts, NatGatewayV2TimeoutsArgs
Import
Nat gateway can be imported using the following format:
$ pulumi import flexibleengine:index/natGatewayV2:NatGatewayV2 nat_1 d126fb87-43ce-4867-a2ff-cf34af3765d9
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.