1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. NatSnatRuleV2
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.NatSnatRuleV2

Explore with Pulumi AI

Manages a V2 SNAT rule resource within FlexibleEngine.

Example Usage

SNAT rule in VPC scenario

import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";

const snat1 = new flexibleengine.NatSnatRuleV2("snat1", {
    natGatewayId: flexibleengine_nat_gateway_v2.nat_1.id,
    floatingIpId: _var.publicip_id,
    subnetId: flexibleengine_vpc_subnet_v1.example_subnet.id,
});
Copy
import pulumi
import pulumi_flexibleengine as flexibleengine

snat1 = flexibleengine.NatSnatRuleV2("snat1",
    nat_gateway_id=flexibleengine_nat_gateway_v2["nat_1"]["id"],
    floating_ip_id=var["publicip_id"],
    subnet_id=flexibleengine_vpc_subnet_v1["example_subnet"]["id"])
Copy
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 {
		_, err := flexibleengine.NewNatSnatRuleV2(ctx, "snat1", &flexibleengine.NatSnatRuleV2Args{
			NatGatewayId: pulumi.Any(flexibleengine_nat_gateway_v2.Nat_1.Id),
			FloatingIpId: pulumi.Any(_var.Publicip_id),
			SubnetId:     pulumi.Any(flexibleengine_vpc_subnet_v1.Example_subnet.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;

return await Deployment.RunAsync(() => 
{
    var snat1 = new Flexibleengine.NatSnatRuleV2("snat1", new()
    {
        NatGatewayId = flexibleengine_nat_gateway_v2.Nat_1.Id,
        FloatingIpId = @var.Publicip_id,
        SubnetId = flexibleengine_vpc_subnet_v1.Example_subnet.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.NatSnatRuleV2;
import com.pulumi.flexibleengine.NatSnatRuleV2Args;
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 snat1 = new NatSnatRuleV2("snat1", NatSnatRuleV2Args.builder()
            .natGatewayId(flexibleengine_nat_gateway_v2.nat_1().id())
            .floatingIpId(var_.publicip_id())
            .subnetId(flexibleengine_vpc_subnet_v1.example_subnet().id())
            .build());

    }
}
Copy
resources:
  snat1:
    type: flexibleengine:NatSnatRuleV2
    properties:
      natGatewayId: ${flexibleengine_nat_gateway_v2.nat_1.id}
      floatingIpId: ${var.publicip_id}
      subnetId: ${flexibleengine_vpc_subnet_v1.example_subnet.id}
Copy

SNAT rule in Direct Connect scenario

import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";

const snat2 = new flexibleengine.NatSnatRuleV2("snat2", {
    natGatewayId: flexibleengine_nat_gateway_v2.nat_1.id,
    floatingIpId: _var.publicip_id,
    sourceType: 1,
    cidr: "192.168.10.0/24",
});
Copy
import pulumi
import pulumi_flexibleengine as flexibleengine

snat2 = flexibleengine.NatSnatRuleV2("snat2",
    nat_gateway_id=flexibleengine_nat_gateway_v2["nat_1"]["id"],
    floating_ip_id=var["publicip_id"],
    source_type=1,
    cidr="192.168.10.0/24")
Copy
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 {
		_, err := flexibleengine.NewNatSnatRuleV2(ctx, "snat2", &flexibleengine.NatSnatRuleV2Args{
			NatGatewayId: pulumi.Any(flexibleengine_nat_gateway_v2.Nat_1.Id),
			FloatingIpId: pulumi.Any(_var.Publicip_id),
			SourceType:   pulumi.Float64(1),
			Cidr:         pulumi.String("192.168.10.0/24"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;

return await Deployment.RunAsync(() => 
{
    var snat2 = new Flexibleengine.NatSnatRuleV2("snat2", new()
    {
        NatGatewayId = flexibleengine_nat_gateway_v2.Nat_1.Id,
        FloatingIpId = @var.Publicip_id,
        SourceType = 1,
        Cidr = "192.168.10.0/24",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.NatSnatRuleV2;
import com.pulumi.flexibleengine.NatSnatRuleV2Args;
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 snat2 = new NatSnatRuleV2("snat2", NatSnatRuleV2Args.builder()
            .natGatewayId(flexibleengine_nat_gateway_v2.nat_1().id())
            .floatingIpId(var_.publicip_id())
            .sourceType(1)
            .cidr("192.168.10.0/24")
            .build());

    }
}
Copy
resources:
  snat2:
    type: flexibleengine:NatSnatRuleV2
    properties:
      natGatewayId: ${flexibleengine_nat_gateway_v2.nat_1.id}
      floatingIpId: ${var.publicip_id}
      sourceType: 1
      cidr: 192.168.10.0/24
Copy

Create NatSnatRuleV2 Resource

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

Constructor syntax

new NatSnatRuleV2(name: string, args: NatSnatRuleV2Args, opts?: CustomResourceOptions);
@overload
def NatSnatRuleV2(resource_name: str,
                  args: NatSnatRuleV2Args,
                  opts: Optional[ResourceOptions] = None)

@overload
def NatSnatRuleV2(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  floating_ip_id: Optional[str] = None,
                  nat_gateway_id: Optional[str] = None,
                  cidr: Optional[str] = None,
                  nat_snat_rule_v2_id: Optional[str] = None,
                  network_id: Optional[str] = None,
                  region: Optional[str] = None,
                  source_type: Optional[float] = None,
                  subnet_id: Optional[str] = None,
                  timeouts: Optional[NatSnatRuleV2TimeoutsArgs] = None)
func NewNatSnatRuleV2(ctx *Context, name string, args NatSnatRuleV2Args, opts ...ResourceOption) (*NatSnatRuleV2, error)
public NatSnatRuleV2(string name, NatSnatRuleV2Args args, CustomResourceOptions? opts = null)
public NatSnatRuleV2(String name, NatSnatRuleV2Args args)
public NatSnatRuleV2(String name, NatSnatRuleV2Args args, CustomResourceOptions options)
type: flexibleengine:NatSnatRuleV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. NatSnatRuleV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. NatSnatRuleV2Args
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. NatSnatRuleV2Args
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. NatSnatRuleV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. NatSnatRuleV2Args
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 natSnatRuleV2Resource = new Flexibleengine.NatSnatRuleV2("natSnatRuleV2Resource", new()
{
    FloatingIpId = "string",
    NatGatewayId = "string",
    Cidr = "string",
    NatSnatRuleV2Id = "string",
    Region = "string",
    SourceType = 0,
    SubnetId = "string",
    Timeouts = new Flexibleengine.Inputs.NatSnatRuleV2TimeoutsArgs
    {
        Create = "string",
        Delete = "string",
    },
});
Copy
example, err := flexibleengine.NewNatSnatRuleV2(ctx, "natSnatRuleV2Resource", &flexibleengine.NatSnatRuleV2Args{
FloatingIpId: pulumi.String("string"),
NatGatewayId: pulumi.String("string"),
Cidr: pulumi.String("string"),
NatSnatRuleV2Id: pulumi.String("string"),
Region: pulumi.String("string"),
SourceType: pulumi.Float64(0),
SubnetId: pulumi.String("string"),
Timeouts: &.NatSnatRuleV2TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
})
Copy
var natSnatRuleV2Resource = new NatSnatRuleV2("natSnatRuleV2Resource", NatSnatRuleV2Args.builder()
    .floatingIpId("string")
    .natGatewayId("string")
    .cidr("string")
    .natSnatRuleV2Id("string")
    .region("string")
    .sourceType(0)
    .subnetId("string")
    .timeouts(NatSnatRuleV2TimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .build())
    .build());
Copy
nat_snat_rule_v2_resource = flexibleengine.NatSnatRuleV2("natSnatRuleV2Resource",
    floating_ip_id="string",
    nat_gateway_id="string",
    cidr="string",
    nat_snat_rule_v2_id="string",
    region="string",
    source_type=0,
    subnet_id="string",
    timeouts={
        "create": "string",
        "delete": "string",
    })
Copy
const natSnatRuleV2Resource = new flexibleengine.NatSnatRuleV2("natSnatRuleV2Resource", {
    floatingIpId: "string",
    natGatewayId: "string",
    cidr: "string",
    natSnatRuleV2Id: "string",
    region: "string",
    sourceType: 0,
    subnetId: "string",
    timeouts: {
        create: "string",
        "delete": "string",
    },
});
Copy
type: flexibleengine:NatSnatRuleV2
properties:
    cidr: string
    floatingIpId: string
    natGatewayId: string
    natSnatRuleV2Id: string
    region: string
    sourceType: 0
    subnetId: string
    timeouts:
        create: string
        delete: string
Copy

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

FloatingIpId This property is required. string
ID of the floating ip this snat rule connets to. Changing this creates a new snat rule.
NatGatewayId This property is required. string
ID of the nat gateway this snat rule belongs to. Changing this creates a new snat rule.
Cidr string
Specifies CIDR, which can be in the format of a network segment or a host IP address. This parameter and subnet_id are alternative. Changing this creates a new snat rule.
NatSnatRuleV2Id string
The resource ID in UUID format.
NetworkId string

Deprecated: Deprecated

Region string
The region in which to obtain the V2 nat client. If omitted, the region argument of the provider is used. Changing this creates a new snat rule.
SourceType double
Specifies the scenario. The valid value is 0 (VPC scenario) and 1 (Direct Connect scenario). Only cidr can be specified over a Direct Connect connection. If no value is entered, the default value 0 (VPC scenario) is used. Changing this creates a new snat rule.
SubnetId string
ID of the VPC Subnet this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
Timeouts NatSnatRuleV2Timeouts
FloatingIpId This property is required. string
ID of the floating ip this snat rule connets to. Changing this creates a new snat rule.
NatGatewayId This property is required. string
ID of the nat gateway this snat rule belongs to. Changing this creates a new snat rule.
Cidr string
Specifies CIDR, which can be in the format of a network segment or a host IP address. This parameter and subnet_id are alternative. Changing this creates a new snat rule.
NatSnatRuleV2Id string
The resource ID in UUID format.
NetworkId string

Deprecated: Deprecated

Region string
The region in which to obtain the V2 nat client. If omitted, the region argument of the provider is used. Changing this creates a new snat rule.
SourceType float64
Specifies the scenario. The valid value is 0 (VPC scenario) and 1 (Direct Connect scenario). Only cidr can be specified over a Direct Connect connection. If no value is entered, the default value 0 (VPC scenario) is used. Changing this creates a new snat rule.
SubnetId string
ID of the VPC Subnet this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
Timeouts NatSnatRuleV2TimeoutsArgs
floatingIpId This property is required. String
ID of the floating ip this snat rule connets to. Changing this creates a new snat rule.
natGatewayId This property is required. String
ID of the nat gateway this snat rule belongs to. Changing this creates a new snat rule.
cidr String
Specifies CIDR, which can be in the format of a network segment or a host IP address. This parameter and subnet_id are alternative. Changing this creates a new snat rule.
natSnatRuleV2Id String
The resource ID in UUID format.
networkId String

Deprecated: Deprecated

region String
The region in which to obtain the V2 nat client. If omitted, the region argument of the provider is used. Changing this creates a new snat rule.
sourceType Double
Specifies the scenario. The valid value is 0 (VPC scenario) and 1 (Direct Connect scenario). Only cidr can be specified over a Direct Connect connection. If no value is entered, the default value 0 (VPC scenario) is used. Changing this creates a new snat rule.
subnetId String
ID of the VPC Subnet this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
timeouts NatSnatRuleV2Timeouts
floatingIpId This property is required. string
ID of the floating ip this snat rule connets to. Changing this creates a new snat rule.
natGatewayId This property is required. string
ID of the nat gateway this snat rule belongs to. Changing this creates a new snat rule.
cidr string
Specifies CIDR, which can be in the format of a network segment or a host IP address. This parameter and subnet_id are alternative. Changing this creates a new snat rule.
natSnatRuleV2Id string
The resource ID in UUID format.
networkId string

Deprecated: Deprecated

region string
The region in which to obtain the V2 nat client. If omitted, the region argument of the provider is used. Changing this creates a new snat rule.
sourceType number
Specifies the scenario. The valid value is 0 (VPC scenario) and 1 (Direct Connect scenario). Only cidr can be specified over a Direct Connect connection. If no value is entered, the default value 0 (VPC scenario) is used. Changing this creates a new snat rule.
subnetId string
ID of the VPC Subnet this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
timeouts NatSnatRuleV2Timeouts
floating_ip_id This property is required. str
ID of the floating ip this snat rule connets to. Changing this creates a new snat rule.
nat_gateway_id This property is required. str
ID of the nat gateway this snat rule belongs to. Changing this creates a new snat rule.
cidr str
Specifies CIDR, which can be in the format of a network segment or a host IP address. This parameter and subnet_id are alternative. Changing this creates a new snat rule.
nat_snat_rule_v2_id str
The resource ID in UUID format.
network_id str

Deprecated: Deprecated

region str
The region in which to obtain the V2 nat client. If omitted, the region argument of the provider is used. Changing this creates a new snat rule.
source_type float
Specifies the scenario. The valid value is 0 (VPC scenario) and 1 (Direct Connect scenario). Only cidr can be specified over a Direct Connect connection. If no value is entered, the default value 0 (VPC scenario) is used. Changing this creates a new snat rule.
subnet_id str
ID of the VPC Subnet this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
timeouts NatSnatRuleV2TimeoutsArgs
floatingIpId This property is required. String
ID of the floating ip this snat rule connets to. Changing this creates a new snat rule.
natGatewayId This property is required. String
ID of the nat gateway this snat rule belongs to. Changing this creates a new snat rule.
cidr String
Specifies CIDR, which can be in the format of a network segment or a host IP address. This parameter and subnet_id are alternative. Changing this creates a new snat rule.
natSnatRuleV2Id String
The resource ID in UUID format.
networkId String

Deprecated: Deprecated

region String
The region in which to obtain the V2 nat client. If omitted, the region argument of the provider is used. Changing this creates a new snat rule.
sourceType Number
Specifies the scenario. The valid value is 0 (VPC scenario) and 1 (Direct Connect scenario). Only cidr can be specified over a Direct Connect connection. If no value is entered, the default value 0 (VPC scenario) is used. Changing this creates a new snat rule.
subnetId String
ID of the VPC Subnet this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
timeouts Property Map

Outputs

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

FloatingIpAddress string
The actual floating IP address.
Id string
The provider-assigned unique ID for this managed resource.
Status string
The status of the snat rule.
FloatingIpAddress string
The actual floating IP address.
Id string
The provider-assigned unique ID for this managed resource.
Status string
The status of the snat rule.
floatingIpAddress String
The actual floating IP address.
id String
The provider-assigned unique ID for this managed resource.
status String
The status of the snat rule.
floatingIpAddress string
The actual floating IP address.
id string
The provider-assigned unique ID for this managed resource.
status string
The status of the snat rule.
floating_ip_address str
The actual floating IP address.
id str
The provider-assigned unique ID for this managed resource.
status str
The status of the snat rule.
floatingIpAddress String
The actual floating IP address.
id String
The provider-assigned unique ID for this managed resource.
status String
The status of the snat rule.

Look up Existing NatSnatRuleV2 Resource

Get an existing NatSnatRuleV2 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?: NatSnatRuleV2State, opts?: CustomResourceOptions): NatSnatRuleV2
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cidr: Optional[str] = None,
        floating_ip_address: Optional[str] = None,
        floating_ip_id: Optional[str] = None,
        nat_gateway_id: Optional[str] = None,
        nat_snat_rule_v2_id: Optional[str] = None,
        network_id: Optional[str] = None,
        region: Optional[str] = None,
        source_type: Optional[float] = None,
        status: Optional[str] = None,
        subnet_id: Optional[str] = None,
        timeouts: Optional[NatSnatRuleV2TimeoutsArgs] = None) -> NatSnatRuleV2
func GetNatSnatRuleV2(ctx *Context, name string, id IDInput, state *NatSnatRuleV2State, opts ...ResourceOption) (*NatSnatRuleV2, error)
public static NatSnatRuleV2 Get(string name, Input<string> id, NatSnatRuleV2State? state, CustomResourceOptions? opts = null)
public static NatSnatRuleV2 get(String name, Output<String> id, NatSnatRuleV2State state, CustomResourceOptions options)
resources:  _:    type: flexibleengine:NatSnatRuleV2    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Cidr string
Specifies CIDR, which can be in the format of a network segment or a host IP address. This parameter and subnet_id are alternative. Changing this creates a new snat rule.
FloatingIpAddress string
The actual floating IP address.
FloatingIpId string
ID of the floating ip this snat rule connets to. Changing this creates a new snat rule.
NatGatewayId string
ID of the nat gateway this snat rule belongs to. Changing this creates a new snat rule.
NatSnatRuleV2Id string
The resource ID in UUID format.
NetworkId string

Deprecated: Deprecated

Region string
The region in which to obtain the V2 nat client. If omitted, the region argument of the provider is used. Changing this creates a new snat rule.
SourceType double
Specifies the scenario. The valid value is 0 (VPC scenario) and 1 (Direct Connect scenario). Only cidr can be specified over a Direct Connect connection. If no value is entered, the default value 0 (VPC scenario) is used. Changing this creates a new snat rule.
Status string
The status of the snat rule.
SubnetId string
ID of the VPC Subnet this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
Timeouts NatSnatRuleV2Timeouts
Cidr string
Specifies CIDR, which can be in the format of a network segment or a host IP address. This parameter and subnet_id are alternative. Changing this creates a new snat rule.
FloatingIpAddress string
The actual floating IP address.
FloatingIpId string
ID of the floating ip this snat rule connets to. Changing this creates a new snat rule.
NatGatewayId string
ID of the nat gateway this snat rule belongs to. Changing this creates a new snat rule.
NatSnatRuleV2Id string
The resource ID in UUID format.
NetworkId string

Deprecated: Deprecated

Region string
The region in which to obtain the V2 nat client. If omitted, the region argument of the provider is used. Changing this creates a new snat rule.
SourceType float64
Specifies the scenario. The valid value is 0 (VPC scenario) and 1 (Direct Connect scenario). Only cidr can be specified over a Direct Connect connection. If no value is entered, the default value 0 (VPC scenario) is used. Changing this creates a new snat rule.
Status string
The status of the snat rule.
SubnetId string
ID of the VPC Subnet this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
Timeouts NatSnatRuleV2TimeoutsArgs
cidr String
Specifies CIDR, which can be in the format of a network segment or a host IP address. This parameter and subnet_id are alternative. Changing this creates a new snat rule.
floatingIpAddress String
The actual floating IP address.
floatingIpId String
ID of the floating ip this snat rule connets to. Changing this creates a new snat rule.
natGatewayId String
ID of the nat gateway this snat rule belongs to. Changing this creates a new snat rule.
natSnatRuleV2Id String
The resource ID in UUID format.
networkId String

Deprecated: Deprecated

region String
The region in which to obtain the V2 nat client. If omitted, the region argument of the provider is used. Changing this creates a new snat rule.
sourceType Double
Specifies the scenario. The valid value is 0 (VPC scenario) and 1 (Direct Connect scenario). Only cidr can be specified over a Direct Connect connection. If no value is entered, the default value 0 (VPC scenario) is used. Changing this creates a new snat rule.
status String
The status of the snat rule.
subnetId String
ID of the VPC Subnet this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
timeouts NatSnatRuleV2Timeouts
cidr string
Specifies CIDR, which can be in the format of a network segment or a host IP address. This parameter and subnet_id are alternative. Changing this creates a new snat rule.
floatingIpAddress string
The actual floating IP address.
floatingIpId string
ID of the floating ip this snat rule connets to. Changing this creates a new snat rule.
natGatewayId string
ID of the nat gateway this snat rule belongs to. Changing this creates a new snat rule.
natSnatRuleV2Id string
The resource ID in UUID format.
networkId string

Deprecated: Deprecated

region string
The region in which to obtain the V2 nat client. If omitted, the region argument of the provider is used. Changing this creates a new snat rule.
sourceType number
Specifies the scenario. The valid value is 0 (VPC scenario) and 1 (Direct Connect scenario). Only cidr can be specified over a Direct Connect connection. If no value is entered, the default value 0 (VPC scenario) is used. Changing this creates a new snat rule.
status string
The status of the snat rule.
subnetId string
ID of the VPC Subnet this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
timeouts NatSnatRuleV2Timeouts
cidr str
Specifies CIDR, which can be in the format of a network segment or a host IP address. This parameter and subnet_id are alternative. Changing this creates a new snat rule.
floating_ip_address str
The actual floating IP address.
floating_ip_id str
ID of the floating ip this snat rule connets to. Changing this creates a new snat rule.
nat_gateway_id str
ID of the nat gateway this snat rule belongs to. Changing this creates a new snat rule.
nat_snat_rule_v2_id str
The resource ID in UUID format.
network_id str

Deprecated: Deprecated

region str
The region in which to obtain the V2 nat client. If omitted, the region argument of the provider is used. Changing this creates a new snat rule.
source_type float
Specifies the scenario. The valid value is 0 (VPC scenario) and 1 (Direct Connect scenario). Only cidr can be specified over a Direct Connect connection. If no value is entered, the default value 0 (VPC scenario) is used. Changing this creates a new snat rule.
status str
The status of the snat rule.
subnet_id str
ID of the VPC Subnet this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
timeouts NatSnatRuleV2TimeoutsArgs
cidr String
Specifies CIDR, which can be in the format of a network segment or a host IP address. This parameter and subnet_id are alternative. Changing this creates a new snat rule.
floatingIpAddress String
The actual floating IP address.
floatingIpId String
ID of the floating ip this snat rule connets to. Changing this creates a new snat rule.
natGatewayId String
ID of the nat gateway this snat rule belongs to. Changing this creates a new snat rule.
natSnatRuleV2Id String
The resource ID in UUID format.
networkId String

Deprecated: Deprecated

region String
The region in which to obtain the V2 nat client. If omitted, the region argument of the provider is used. Changing this creates a new snat rule.
sourceType Number
Specifies the scenario. The valid value is 0 (VPC scenario) and 1 (Direct Connect scenario). Only cidr can be specified over a Direct Connect connection. If no value is entered, the default value 0 (VPC scenario) is used. Changing this creates a new snat rule.
status String
The status of the snat rule.
subnetId String
ID of the VPC Subnet this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
timeouts Property Map

Supporting Types

NatSnatRuleV2Timeouts
, NatSnatRuleV2TimeoutsArgs

Create string
Delete string
Create string
Delete string
create String
delete String
create string
delete string
create str
delete str
create String
delete String

Import

SNAT rules can be imported using the following format:

$ pulumi import flexibleengine:index/natSnatRuleV2:NatSnatRuleV2 snat_1 9e0713cb-0a2f-484e-8c7d-daecbb61dbe4
Copy

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.