1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. NatSnatRuleV2
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.NatSnatRuleV2

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

    Up-to-date reference of API arguments for NAT SNAT you can get at documentation portal

    Manages a V2 snat rule resource within OpenTelekomCloud Nat.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const networkId = config.requireObject("networkId");
    const vpcId = config.requireObject("vpcId");
    const fip1 = new opentelekomcloud.NetworkingFloatingipV2("fip1", {});
    const nat1 = new opentelekomcloud.NatGatewayV2("nat1", {
        description: "test for terraform",
        spec: "1",
        internalNetworkId: networkId,
        routerId: vpcId,
    });
    const snat1 = new opentelekomcloud.NatSnatRuleV2("snat1", {
        natGatewayId: nat1.natGatewayV2Id,
        floatingIpId: fip1.networkingFloatingipV2Id,
        cidr: "192.168.0.0/24",
        sourceType: 0,
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    network_id = config.require_object("networkId")
    vpc_id = config.require_object("vpcId")
    fip1 = opentelekomcloud.NetworkingFloatingipV2("fip1")
    nat1 = opentelekomcloud.NatGatewayV2("nat1",
        description="test for terraform",
        spec="1",
        internal_network_id=network_id,
        router_id=vpc_id)
    snat1 = opentelekomcloud.NatSnatRuleV2("snat1",
        nat_gateway_id=nat1.nat_gateway_v2_id,
        floating_ip_id=fip1.networking_floatingip_v2_id,
        cidr="192.168.0.0/24",
        source_type=0)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		networkId := cfg.RequireObject("networkId")
    		vpcId := cfg.RequireObject("vpcId")
    		fip1, err := opentelekomcloud.NewNetworkingFloatingipV2(ctx, "fip1", nil)
    		if err != nil {
    			return err
    		}
    		nat1, err := opentelekomcloud.NewNatGatewayV2(ctx, "nat1", &opentelekomcloud.NatGatewayV2Args{
    			Description:       pulumi.String("test for terraform"),
    			Spec:              pulumi.String("1"),
    			InternalNetworkId: pulumi.Any(networkId),
    			RouterId:          pulumi.Any(vpcId),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = opentelekomcloud.NewNatSnatRuleV2(ctx, "snat1", &opentelekomcloud.NatSnatRuleV2Args{
    			NatGatewayId: nat1.NatGatewayV2Id,
    			FloatingIpId: fip1.NetworkingFloatingipV2Id,
    			Cidr:         pulumi.String("192.168.0.0/24"),
    			SourceType:   pulumi.Float64(0),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var networkId = config.RequireObject<dynamic>("networkId");
        var vpcId = config.RequireObject<dynamic>("vpcId");
        var fip1 = new Opentelekomcloud.NetworkingFloatingipV2("fip1");
    
        var nat1 = new Opentelekomcloud.NatGatewayV2("nat1", new()
        {
            Description = "test for terraform",
            Spec = "1",
            InternalNetworkId = networkId,
            RouterId = vpcId,
        });
    
        var snat1 = new Opentelekomcloud.NatSnatRuleV2("snat1", new()
        {
            NatGatewayId = nat1.NatGatewayV2Id,
            FloatingIpId = fip1.NetworkingFloatingipV2Id,
            Cidr = "192.168.0.0/24",
            SourceType = 0,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.NetworkingFloatingipV2;
    import com.pulumi.opentelekomcloud.NatGatewayV2;
    import com.pulumi.opentelekomcloud.NatGatewayV2Args;
    import com.pulumi.opentelekomcloud.NatSnatRuleV2;
    import com.pulumi.opentelekomcloud.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) {
            final var config = ctx.config();
            final var networkId = config.get("networkId");
            final var vpcId = config.get("vpcId");
            var fip1 = new NetworkingFloatingipV2("fip1");
    
            var nat1 = new NatGatewayV2("nat1", NatGatewayV2Args.builder()
                .description("test for terraform")
                .spec("1")
                .internalNetworkId(networkId)
                .routerId(vpcId)
                .build());
    
            var snat1 = new NatSnatRuleV2("snat1", NatSnatRuleV2Args.builder()
                .natGatewayId(nat1.natGatewayV2Id())
                .floatingIpId(fip1.networkingFloatingipV2Id())
                .cidr("192.168.0.0/24")
                .sourceType(0)
                .build());
    
        }
    }
    
    configuration:
      networkId:
        type: dynamic
      vpcId:
        type: dynamic
    resources:
      fip1:
        type: opentelekomcloud:NetworkingFloatingipV2
      nat1:
        type: opentelekomcloud:NatGatewayV2
        properties:
          description: test for terraform
          spec: '1'
          internalNetworkId: ${networkId}
          routerId: ${vpcId}
      snat1:
        type: opentelekomcloud:NatSnatRuleV2
        properties:
          natGatewayId: ${nat1.natGatewayV2Id}
          floatingIpId: ${fip1.networkingFloatingipV2Id}
          cidr: 192.168.0.0/24
          sourceType: 0
    

    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,
                      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: opentelekomcloud:NatSnatRuleV2
    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 NatSnatRuleV2Args
    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 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 string
    The unique name of the resource.
    args NatSnatRuleV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NatSnatRuleV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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 Opentelekomcloud.NatSnatRuleV2("natSnatRuleV2Resource", new()
    {
        FloatingIpId = "string",
        NatGatewayId = "string",
        Cidr = "string",
        NatSnatRuleV2Id = "string",
        NetworkId = "string",
        Region = "string",
        SourceType = 0,
        Timeouts = new Opentelekomcloud.Inputs.NatSnatRuleV2TimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
    });
    
    example, err := opentelekomcloud.NewNatSnatRuleV2(ctx, "natSnatRuleV2Resource", &opentelekomcloud.NatSnatRuleV2Args{
    	FloatingIpId:    pulumi.String("string"),
    	NatGatewayId:    pulumi.String("string"),
    	Cidr:            pulumi.String("string"),
    	NatSnatRuleV2Id: pulumi.String("string"),
    	NetworkId:       pulumi.String("string"),
    	Region:          pulumi.String("string"),
    	SourceType:      pulumi.Float64(0),
    	Timeouts: &opentelekomcloud.NatSnatRuleV2TimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    })
    
    var natSnatRuleV2Resource = new NatSnatRuleV2("natSnatRuleV2Resource", NatSnatRuleV2Args.builder()
        .floatingIpId("string")
        .natGatewayId("string")
        .cidr("string")
        .natSnatRuleV2Id("string")
        .networkId("string")
        .region("string")
        .sourceType(0)
        .timeouts(NatSnatRuleV2TimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .build());
    
    nat_snat_rule_v2_resource = opentelekomcloud.NatSnatRuleV2("natSnatRuleV2Resource",
        floating_ip_id="string",
        nat_gateway_id="string",
        cidr="string",
        nat_snat_rule_v2_id="string",
        network_id="string",
        region="string",
        source_type=0,
        timeouts={
            "create": "string",
            "delete": "string",
        })
    
    const natSnatRuleV2Resource = new opentelekomcloud.NatSnatRuleV2("natSnatRuleV2Resource", {
        floatingIpId: "string",
        natGatewayId: "string",
        cidr: "string",
        natSnatRuleV2Id: "string",
        networkId: "string",
        region: "string",
        sourceType: 0,
        timeouts: {
            create: "string",
            "delete": "string",
        },
    });
    
    type: opentelekomcloud:NatSnatRuleV2
    properties:
        cidr: string
        floatingIpId: string
        natGatewayId: string
        natSnatRuleV2Id: string
        networkId: string
        region: string
        sourceType: 0
        timeouts:
            create: string
            delete: string
    

    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 string
    ID of the floating ip this snat rule connects 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.
    Cidr string
    Specifies CIDR, which can be in the format of a network segment or a host IP address. This parameter and network_id are alternative. If the value of source_type is 0, the CIDR block must be a subset of the VPC subnet CIDR block. If the value of source_type is 1, the CIDR block must be a CIDR block of Direct Connect and cannot conflict with the VPC CIDR blocks. Changing this creates a new snat rule.
    NatSnatRuleV2Id string
    NetworkId string
    ID of the network this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
    Region string
    SourceType double
    0: Either network_id or cidr can be specified in a VPC. 1: Only cidr can be specified over a dedicated network. Changing this creates a new snat rule.
    Timeouts NatSnatRuleV2Timeouts
    FloatingIpId string
    ID of the floating ip this snat rule connects 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.
    Cidr string
    Specifies CIDR, which can be in the format of a network segment or a host IP address. This parameter and network_id are alternative. If the value of source_type is 0, the CIDR block must be a subset of the VPC subnet CIDR block. If the value of source_type is 1, the CIDR block must be a CIDR block of Direct Connect and cannot conflict with the VPC CIDR blocks. Changing this creates a new snat rule.
    NatSnatRuleV2Id string
    NetworkId string
    ID of the network this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
    Region string
    SourceType float64
    0: Either network_id or cidr can be specified in a VPC. 1: Only cidr can be specified over a dedicated network. Changing this creates a new snat rule.
    Timeouts NatSnatRuleV2TimeoutsArgs
    floatingIpId String
    ID of the floating ip this snat rule connects 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.
    cidr String
    Specifies CIDR, which can be in the format of a network segment or a host IP address. This parameter and network_id are alternative. If the value of source_type is 0, the CIDR block must be a subset of the VPC subnet CIDR block. If the value of source_type is 1, the CIDR block must be a CIDR block of Direct Connect and cannot conflict with the VPC CIDR blocks. Changing this creates a new snat rule.
    natSnatRuleV2Id String
    networkId String
    ID of the network this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
    region String
    sourceType Double
    0: Either network_id or cidr can be specified in a VPC. 1: Only cidr can be specified over a dedicated network. Changing this creates a new snat rule.
    timeouts NatSnatRuleV2Timeouts
    floatingIpId string
    ID of the floating ip this snat rule connects 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.
    cidr string
    Specifies CIDR, which can be in the format of a network segment or a host IP address. This parameter and network_id are alternative. If the value of source_type is 0, the CIDR block must be a subset of the VPC subnet CIDR block. If the value of source_type is 1, the CIDR block must be a CIDR block of Direct Connect and cannot conflict with the VPC CIDR blocks. Changing this creates a new snat rule.
    natSnatRuleV2Id string
    networkId string
    ID of the network this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
    region string
    sourceType number
    0: Either network_id or cidr can be specified in a VPC. 1: Only cidr can be specified over a dedicated network. Changing this creates a new snat rule.
    timeouts NatSnatRuleV2Timeouts
    floating_ip_id str
    ID of the floating ip this snat rule connects 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.
    cidr str
    Specifies CIDR, which can be in the format of a network segment or a host IP address. This parameter and network_id are alternative. If the value of source_type is 0, the CIDR block must be a subset of the VPC subnet CIDR block. If the value of source_type is 1, the CIDR block must be a CIDR block of Direct Connect and cannot conflict with the VPC CIDR blocks. Changing this creates a new snat rule.
    nat_snat_rule_v2_id str
    network_id str
    ID of the network this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
    region str
    source_type float
    0: Either network_id or cidr can be specified in a VPC. 1: Only cidr can be specified over a dedicated network. Changing this creates a new snat rule.
    timeouts NatSnatRuleV2TimeoutsArgs
    floatingIpId String
    ID of the floating ip this snat rule connects 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.
    cidr String
    Specifies CIDR, which can be in the format of a network segment or a host IP address. This parameter and network_id are alternative. If the value of source_type is 0, the CIDR block must be a subset of the VPC subnet CIDR block. If the value of source_type is 1, the CIDR block must be a CIDR block of Direct Connect and cannot conflict with the VPC CIDR blocks. Changing this creates a new snat rule.
    natSnatRuleV2Id String
    networkId String
    ID of the network this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
    region String
    sourceType Number
    0: Either network_id or cidr can be specified in a VPC. 1: Only cidr can be specified over a dedicated network. 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:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing 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_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,
            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: opentelekomcloud:NatSnatRuleV2    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.
    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 network_id are alternative. If the value of source_type is 0, the CIDR block must be a subset of the VPC subnet CIDR block. If the value of source_type is 1, the CIDR block must be a CIDR block of Direct Connect and cannot conflict with the VPC CIDR blocks. Changing this creates a new snat rule.
    FloatingIpId string
    ID of the floating ip this snat rule connects 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
    NetworkId string
    ID of the network this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
    Region string
    SourceType double
    0: Either network_id or cidr can be specified in a VPC. 1: Only cidr can be specified over a dedicated network. 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 network_id are alternative. If the value of source_type is 0, the CIDR block must be a subset of the VPC subnet CIDR block. If the value of source_type is 1, the CIDR block must be a CIDR block of Direct Connect and cannot conflict with the VPC CIDR blocks. Changing this creates a new snat rule.
    FloatingIpId string
    ID of the floating ip this snat rule connects 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
    NetworkId string
    ID of the network this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
    Region string
    SourceType float64
    0: Either network_id or cidr can be specified in a VPC. 1: Only cidr can be specified over a dedicated network. 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 network_id are alternative. If the value of source_type is 0, the CIDR block must be a subset of the VPC subnet CIDR block. If the value of source_type is 1, the CIDR block must be a CIDR block of Direct Connect and cannot conflict with the VPC CIDR blocks. Changing this creates a new snat rule.
    floatingIpId String
    ID of the floating ip this snat rule connects 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
    networkId String
    ID of the network this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
    region String
    sourceType Double
    0: Either network_id or cidr can be specified in a VPC. 1: Only cidr can be specified over a dedicated network. 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 network_id are alternative. If the value of source_type is 0, the CIDR block must be a subset of the VPC subnet CIDR block. If the value of source_type is 1, the CIDR block must be a CIDR block of Direct Connect and cannot conflict with the VPC CIDR blocks. Changing this creates a new snat rule.
    floatingIpId string
    ID of the floating ip this snat rule connects 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
    networkId string
    ID of the network this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
    region string
    sourceType number
    0: Either network_id or cidr can be specified in a VPC. 1: Only cidr can be specified over a dedicated network. 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 network_id are alternative. If the value of source_type is 0, the CIDR block must be a subset of the VPC subnet CIDR block. If the value of source_type is 1, the CIDR block must be a CIDR block of Direct Connect and cannot conflict with the VPC CIDR blocks. Changing this creates a new snat rule.
    floating_ip_id str
    ID of the floating ip this snat rule connects 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
    network_id str
    ID of the network this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
    region str
    source_type float
    0: Either network_id or cidr can be specified in a VPC. 1: Only cidr can be specified over a dedicated network. 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 network_id are alternative. If the value of source_type is 0, the CIDR block must be a subset of the VPC subnet CIDR block. If the value of source_type is 1, the CIDR block must be a CIDR block of Direct Connect and cannot conflict with the VPC CIDR blocks. Changing this creates a new snat rule.
    floatingIpId String
    ID of the floating ip this snat rule connects 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
    networkId String
    ID of the network this snat rule connects to. This parameter and cidr are alternative. Changing this creates a new snat rule.
    region String
    sourceType Number
    0: Either network_id or cidr can be specified in a VPC. 1: Only cidr can be specified over a dedicated network. 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 can be imported using the following format:

    $ pulumi import opentelekomcloud:index/natSnatRuleV2:NatSnatRuleV2 snat_1 f4f783a7-b908-4215-b018-724960e5df4b
    

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

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud