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

flexibleengine.VpcRouteV2

Explore with Pulumi AI

flexibleengine logo
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

    !> WARNING: It has been deprecated, use flexibleengine.VpcRoute instead.

    Provides a resource to create a route.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const vpcRoute = new flexibleengine.VpcRouteV2("vpcRoute", {
        type: "peering",
        nexthop: _var.nexthop,
        destination: "192.168.0.0/16",
        vpcId: _var.vpc_id,
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    vpc_route = flexibleengine.VpcRouteV2("vpcRoute",
        type="peering",
        nexthop=var["nexthop"],
        destination="192.168.0.0/16",
        vpc_id=var["vpc_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 {
    		_, err := flexibleengine.NewVpcRouteV2(ctx, "vpcRoute", &flexibleengine.VpcRouteV2Args{
    			Type:        pulumi.String("peering"),
    			Nexthop:     pulumi.Any(_var.Nexthop),
    			Destination: pulumi.String("192.168.0.0/16"),
    			VpcId:       pulumi.Any(_var.Vpc_id),
    		})
    		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 vpcRoute = new Flexibleengine.VpcRouteV2("vpcRoute", new()
        {
            Type = "peering",
            Nexthop = @var.Nexthop,
            Destination = "192.168.0.0/16",
            VpcId = @var.Vpc_id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.VpcRouteV2;
    import com.pulumi.flexibleengine.VpcRouteV2Args;
    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 vpcRoute = new VpcRouteV2("vpcRoute", VpcRouteV2Args.builder()
                .type("peering")
                .nexthop(var_.nexthop())
                .destination("192.168.0.0/16")
                .vpcId(var_.vpc_id())
                .build());
    
        }
    }
    
    resources:
      vpcRoute:
        type: flexibleengine:VpcRouteV2
        properties:
          type: peering
          nexthop: ${var.nexthop}
          destination: 192.168.0.0/16
          vpcId: ${var.vpc_id}
    

    Create VpcRouteV2 Resource

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

    Constructor syntax

    new VpcRouteV2(name: string, args: VpcRouteV2Args, opts?: CustomResourceOptions);
    @overload
    def VpcRouteV2(resource_name: str,
                   args: VpcRouteV2Args,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpcRouteV2(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   destination: Optional[str] = None,
                   nexthop: Optional[str] = None,
                   type: Optional[str] = None,
                   vpc_id: Optional[str] = None,
                   region: Optional[str] = None,
                   tenant_id: Optional[str] = None,
                   timeouts: Optional[VpcRouteV2TimeoutsArgs] = None,
                   vpc_route_v2_id: Optional[str] = None)
    func NewVpcRouteV2(ctx *Context, name string, args VpcRouteV2Args, opts ...ResourceOption) (*VpcRouteV2, error)
    public VpcRouteV2(string name, VpcRouteV2Args args, CustomResourceOptions? opts = null)
    public VpcRouteV2(String name, VpcRouteV2Args args)
    public VpcRouteV2(String name, VpcRouteV2Args args, CustomResourceOptions options)
    
    type: flexibleengine:VpcRouteV2
    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 VpcRouteV2Args
    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 VpcRouteV2Args
    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 VpcRouteV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcRouteV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcRouteV2Args
    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 vpcRouteV2Resource = new Flexibleengine.VpcRouteV2("vpcRouteV2Resource", new()
    {
        Destination = "string",
        Nexthop = "string",
        Type = "string",
        VpcId = "string",
        Region = "string",
        TenantId = "string",
        Timeouts = new Flexibleengine.Inputs.VpcRouteV2TimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
        VpcRouteV2Id = "string",
    });
    
    example, err := flexibleengine.NewVpcRouteV2(ctx, "vpcRouteV2Resource", &flexibleengine.VpcRouteV2Args{
    	Destination: pulumi.String("string"),
    	Nexthop:     pulumi.String("string"),
    	Type:        pulumi.String("string"),
    	VpcId:       pulumi.String("string"),
    	Region:      pulumi.String("string"),
    	TenantId:    pulumi.String("string"),
    	Timeouts: &flexibleengine.VpcRouteV2TimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    	VpcRouteV2Id: pulumi.String("string"),
    })
    
    var vpcRouteV2Resource = new VpcRouteV2("vpcRouteV2Resource", VpcRouteV2Args.builder()
        .destination("string")
        .nexthop("string")
        .type("string")
        .vpcId("string")
        .region("string")
        .tenantId("string")
        .timeouts(VpcRouteV2TimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .vpcRouteV2Id("string")
        .build());
    
    vpc_route_v2_resource = flexibleengine.VpcRouteV2("vpcRouteV2Resource",
        destination="string",
        nexthop="string",
        type="string",
        vpc_id="string",
        region="string",
        tenant_id="string",
        timeouts={
            "create": "string",
            "delete": "string",
        },
        vpc_route_v2_id="string")
    
    const vpcRouteV2Resource = new flexibleengine.VpcRouteV2("vpcRouteV2Resource", {
        destination: "string",
        nexthop: "string",
        type: "string",
        vpcId: "string",
        region: "string",
        tenantId: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
        vpcRouteV2Id: "string",
    });
    
    type: flexibleengine:VpcRouteV2
    properties:
        destination: string
        nexthop: string
        region: string
        tenantId: string
        timeouts:
            create: string
            delete: string
        type: string
        vpcId: string
        vpcRouteV2Id: string
    

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

    Destination string
    Specifies the destination IP address or CIDR block. Changing this creates a new Route.
    Nexthop string
    Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
    Type string
    Specifies the route type. Currently, the value can only be peering. Changing this creates a new Route.
    VpcId string
    Specifies the VPC for which a route is to be added. Changing this creates a new Route.
    Region string
    The region in which to create the VPC route table. If omitted, the provider-level region will be used. Changing this creates a new resource.
    TenantId string
    Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
    Timeouts VpcRouteV2Timeouts
    VpcRouteV2Id string
    The route ID.
    Destination string
    Specifies the destination IP address or CIDR block. Changing this creates a new Route.
    Nexthop string
    Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
    Type string
    Specifies the route type. Currently, the value can only be peering. Changing this creates a new Route.
    VpcId string
    Specifies the VPC for which a route is to be added. Changing this creates a new Route.
    Region string
    The region in which to create the VPC route table. If omitted, the provider-level region will be used. Changing this creates a new resource.
    TenantId string
    Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
    Timeouts VpcRouteV2TimeoutsArgs
    VpcRouteV2Id string
    The route ID.
    destination String
    Specifies the destination IP address or CIDR block. Changing this creates a new Route.
    nexthop String
    Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
    type String
    Specifies the route type. Currently, the value can only be peering. Changing this creates a new Route.
    vpcId String
    Specifies the VPC for which a route is to be added. Changing this creates a new Route.
    region String
    The region in which to create the VPC route table. If omitted, the provider-level region will be used. Changing this creates a new resource.
    tenantId String
    Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
    timeouts VpcRouteV2Timeouts
    vpcRouteV2Id String
    The route ID.
    destination string
    Specifies the destination IP address or CIDR block. Changing this creates a new Route.
    nexthop string
    Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
    type string
    Specifies the route type. Currently, the value can only be peering. Changing this creates a new Route.
    vpcId string
    Specifies the VPC for which a route is to be added. Changing this creates a new Route.
    region string
    The region in which to create the VPC route table. If omitted, the provider-level region will be used. Changing this creates a new resource.
    tenantId string
    Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
    timeouts VpcRouteV2Timeouts
    vpcRouteV2Id string
    The route ID.
    destination str
    Specifies the destination IP address or CIDR block. Changing this creates a new Route.
    nexthop str
    Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
    type str
    Specifies the route type. Currently, the value can only be peering. Changing this creates a new Route.
    vpc_id str
    Specifies the VPC for which a route is to be added. Changing this creates a new Route.
    region str
    The region in which to create the VPC route table. If omitted, the provider-level region will be used. Changing this creates a new resource.
    tenant_id str
    Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
    timeouts VpcRouteV2TimeoutsArgs
    vpc_route_v2_id str
    The route ID.
    destination String
    Specifies the destination IP address or CIDR block. Changing this creates a new Route.
    nexthop String
    Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
    type String
    Specifies the route type. Currently, the value can only be peering. Changing this creates a new Route.
    vpcId String
    Specifies the VPC for which a route is to be added. Changing this creates a new Route.
    region String
    The region in which to create the VPC route table. If omitted, the provider-level region will be used. Changing this creates a new resource.
    tenantId String
    Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
    timeouts Property Map
    vpcRouteV2Id String
    The route ID.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the VpcRouteV2 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 VpcRouteV2 Resource

    Get an existing VpcRouteV2 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?: VpcRouteV2State, opts?: CustomResourceOptions): VpcRouteV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            destination: Optional[str] = None,
            nexthop: Optional[str] = None,
            region: Optional[str] = None,
            tenant_id: Optional[str] = None,
            timeouts: Optional[VpcRouteV2TimeoutsArgs] = None,
            type: Optional[str] = None,
            vpc_id: Optional[str] = None,
            vpc_route_v2_id: Optional[str] = None) -> VpcRouteV2
    func GetVpcRouteV2(ctx *Context, name string, id IDInput, state *VpcRouteV2State, opts ...ResourceOption) (*VpcRouteV2, error)
    public static VpcRouteV2 Get(string name, Input<string> id, VpcRouteV2State? state, CustomResourceOptions? opts = null)
    public static VpcRouteV2 get(String name, Output<String> id, VpcRouteV2State state, CustomResourceOptions options)
    resources:  _:    type: flexibleengine:VpcRouteV2    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:
    Destination string
    Specifies the destination IP address or CIDR block. Changing this creates a new Route.
    Nexthop string
    Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
    Region string
    The region in which to create the VPC route table. If omitted, the provider-level region will be used. Changing this creates a new resource.
    TenantId string
    Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
    Timeouts VpcRouteV2Timeouts
    Type string
    Specifies the route type. Currently, the value can only be peering. Changing this creates a new Route.
    VpcId string
    Specifies the VPC for which a route is to be added. Changing this creates a new Route.
    VpcRouteV2Id string
    The route ID.
    Destination string
    Specifies the destination IP address or CIDR block. Changing this creates a new Route.
    Nexthop string
    Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
    Region string
    The region in which to create the VPC route table. If omitted, the provider-level region will be used. Changing this creates a new resource.
    TenantId string
    Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
    Timeouts VpcRouteV2TimeoutsArgs
    Type string
    Specifies the route type. Currently, the value can only be peering. Changing this creates a new Route.
    VpcId string
    Specifies the VPC for which a route is to be added. Changing this creates a new Route.
    VpcRouteV2Id string
    The route ID.
    destination String
    Specifies the destination IP address or CIDR block. Changing this creates a new Route.
    nexthop String
    Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
    region String
    The region in which to create the VPC route table. If omitted, the provider-level region will be used. Changing this creates a new resource.
    tenantId String
    Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
    timeouts VpcRouteV2Timeouts
    type String
    Specifies the route type. Currently, the value can only be peering. Changing this creates a new Route.
    vpcId String
    Specifies the VPC for which a route is to be added. Changing this creates a new Route.
    vpcRouteV2Id String
    The route ID.
    destination string
    Specifies the destination IP address or CIDR block. Changing this creates a new Route.
    nexthop string
    Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
    region string
    The region in which to create the VPC route table. If omitted, the provider-level region will be used. Changing this creates a new resource.
    tenantId string
    Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
    timeouts VpcRouteV2Timeouts
    type string
    Specifies the route type. Currently, the value can only be peering. Changing this creates a new Route.
    vpcId string
    Specifies the VPC for which a route is to be added. Changing this creates a new Route.
    vpcRouteV2Id string
    The route ID.
    destination str
    Specifies the destination IP address or CIDR block. Changing this creates a new Route.
    nexthop str
    Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
    region str
    The region in which to create the VPC route table. If omitted, the provider-level region will be used. Changing this creates a new resource.
    tenant_id str
    Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
    timeouts VpcRouteV2TimeoutsArgs
    type str
    Specifies the route type. Currently, the value can only be peering. Changing this creates a new Route.
    vpc_id str
    Specifies the VPC for which a route is to be added. Changing this creates a new Route.
    vpc_route_v2_id str
    The route ID.
    destination String
    Specifies the destination IP address or CIDR block. Changing this creates a new Route.
    nexthop String
    Specifies the next hop. If the route type is peering, enter the VPC peering connection ID. Changing this creates a new Route.
    region String
    The region in which to create the VPC route table. If omitted, the provider-level region will be used. Changing this creates a new resource.
    tenantId String
    Specifies the tenant ID. Only the administrator can specify the tenant ID of other tenant. Changing this creates a new Route.
    timeouts Property Map
    type String
    Specifies the route type. Currently, the value can only be peering. Changing this creates a new Route.
    vpcId String
    Specifies the VPC for which a route is to be added. Changing this creates a new Route.
    vpcRouteV2Id String
    The route ID.

    Supporting Types

    VpcRouteV2Timeouts, VpcRouteV2TimeoutsArgs

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

    Package Details

    Repository
    flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
    License
    Notes
    This Pulumi package is based on the flexibleengine Terraform Provider.
    flexibleengine logo
    flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud