1. Packages
  2. Vkcs Provider
  3. API Docs
  4. DcStaticRoute
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

vkcs.DcStaticRoute

Explore with Pulumi AI

vkcs logo
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

    Manages a direct connect BGP Static Announce resource.

    Note: This resource requires Sprut SDN to be enabled in your project.

    New since v0.5.0.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const dcStaticRoute = new vkcs.DcStaticRoute("dcStaticRoute", {
        description: "tf-example-description",
        dcRouterId: vkcs_dc_router.dc_router.id,
        network: "192.168.1.0/24",
        gateway: "192.168.1.3",
        metric: 1,
    });
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    dc_static_route = vkcs.DcStaticRoute("dcStaticRoute",
        description="tf-example-description",
        dc_router_id=vkcs_dc_router["dc_router"]["id"],
        network="192.168.1.0/24",
        gateway="192.168.1.3",
        metric=1)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vkcs.NewDcStaticRoute(ctx, "dcStaticRoute", &vkcs.DcStaticRouteArgs{
    			Description: pulumi.String("tf-example-description"),
    			DcRouterId:  pulumi.Any(vkcs_dc_router.Dc_router.Id),
    			Network:     pulumi.String("192.168.1.0/24"),
    			Gateway:     pulumi.String("192.168.1.3"),
    			Metric:      pulumi.Float64(1),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vkcs = Pulumi.Vkcs;
    
    return await Deployment.RunAsync(() => 
    {
        var dcStaticRoute = new Vkcs.DcStaticRoute("dcStaticRoute", new()
        {
            Description = "tf-example-description",
            DcRouterId = vkcs_dc_router.Dc_router.Id,
            Network = "192.168.1.0/24",
            Gateway = "192.168.1.3",
            Metric = 1,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vkcs.DcStaticRoute;
    import com.pulumi.vkcs.DcStaticRouteArgs;
    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 dcStaticRoute = new DcStaticRoute("dcStaticRoute", DcStaticRouteArgs.builder()
                .description("tf-example-description")
                .dcRouterId(vkcs_dc_router.dc_router().id())
                .network("192.168.1.0/24")
                .gateway("192.168.1.3")
                .metric(1)
                .build());
    
        }
    }
    
    resources:
      dcStaticRoute:
        type: vkcs:DcStaticRoute
        properties:
          description: tf-example-description
          dcRouterId: ${vkcs_dc_router.dc_router.id}
          network: 192.168.1.0/24
          gateway: 192.168.1.3
          metric: 1
    

    Create DcStaticRoute Resource

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

    Constructor syntax

    new DcStaticRoute(name: string, args: DcStaticRouteArgs, opts?: CustomResourceOptions);
    @overload
    def DcStaticRoute(resource_name: str,
                      args: DcStaticRouteArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def DcStaticRoute(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      dc_router_id: Optional[str] = None,
                      gateway: Optional[str] = None,
                      network: Optional[str] = None,
                      description: Optional[str] = None,
                      metric: Optional[float] = None,
                      name: Optional[str] = None,
                      region: Optional[str] = None)
    func NewDcStaticRoute(ctx *Context, name string, args DcStaticRouteArgs, opts ...ResourceOption) (*DcStaticRoute, error)
    public DcStaticRoute(string name, DcStaticRouteArgs args, CustomResourceOptions? opts = null)
    public DcStaticRoute(String name, DcStaticRouteArgs args)
    public DcStaticRoute(String name, DcStaticRouteArgs args, CustomResourceOptions options)
    
    type: vkcs:DcStaticRoute
    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 DcStaticRouteArgs
    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 DcStaticRouteArgs
    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 DcStaticRouteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DcStaticRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DcStaticRouteArgs
    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 dcStaticRouteResource = new Vkcs.DcStaticRoute("dcStaticRouteResource", new()
    {
        DcRouterId = "string",
        Gateway = "string",
        Network = "string",
        Description = "string",
        Metric = 0,
        Name = "string",
        Region = "string",
    });
    
    example, err := vkcs.NewDcStaticRoute(ctx, "dcStaticRouteResource", &vkcs.DcStaticRouteArgs{
    DcRouterId: pulumi.String("string"),
    Gateway: pulumi.String("string"),
    Network: pulumi.String("string"),
    Description: pulumi.String("string"),
    Metric: pulumi.Float64(0),
    Name: pulumi.String("string"),
    Region: pulumi.String("string"),
    })
    
    var dcStaticRouteResource = new DcStaticRoute("dcStaticRouteResource", DcStaticRouteArgs.builder()
        .dcRouterId("string")
        .gateway("string")
        .network("string")
        .description("string")
        .metric(0)
        .name("string")
        .region("string")
        .build());
    
    dc_static_route_resource = vkcs.DcStaticRoute("dcStaticRouteResource",
        dc_router_id="string",
        gateway="string",
        network="string",
        description="string",
        metric=0,
        name="string",
        region="string")
    
    const dcStaticRouteResource = new vkcs.DcStaticRoute("dcStaticRouteResource", {
        dcRouterId: "string",
        gateway: "string",
        network: "string",
        description: "string",
        metric: 0,
        name: "string",
        region: "string",
    });
    
    type: vkcs:DcStaticRoute
    properties:
        dcRouterId: string
        description: string
        gateway: string
        metric: 0
        name: string
        network: string
        region: string
    

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

    DcRouterId string
    required string → Direct Connect Router ID to attach. Changing this creates a new resource
    Gateway string
    required string → IP address of gateway. Changing this creates a new resource
    Network string
    required string → Subnet in CIDR notation. Changing this creates a new resource
    Description string
    optional string → Description of the static route
    Metric double
    optional number → Metric to use for route. Default is 1
    Name string
    optional string → Name of the static route
    Region string
    optional string → The region to fetch availability zones from, defaults to the provider's region.
    DcRouterId string
    required string → Direct Connect Router ID to attach. Changing this creates a new resource
    Gateway string
    required string → IP address of gateway. Changing this creates a new resource
    Network string
    required string → Subnet in CIDR notation. Changing this creates a new resource
    Description string
    optional string → Description of the static route
    Metric float64
    optional number → Metric to use for route. Default is 1
    Name string
    optional string → Name of the static route
    Region string
    optional string → The region to fetch availability zones from, defaults to the provider's region.
    dcRouterId String
    required string → Direct Connect Router ID to attach. Changing this creates a new resource
    gateway String
    required string → IP address of gateway. Changing this creates a new resource
    network String
    required string → Subnet in CIDR notation. Changing this creates a new resource
    description String
    optional string → Description of the static route
    metric Double
    optional number → Metric to use for route. Default is 1
    name String
    optional string → Name of the static route
    region String
    optional string → The region to fetch availability zones from, defaults to the provider's region.
    dcRouterId string
    required string → Direct Connect Router ID to attach. Changing this creates a new resource
    gateway string
    required string → IP address of gateway. Changing this creates a new resource
    network string
    required string → Subnet in CIDR notation. Changing this creates a new resource
    description string
    optional string → Description of the static route
    metric number
    optional number → Metric to use for route. Default is 1
    name string
    optional string → Name of the static route
    region string
    optional string → The region to fetch availability zones from, defaults to the provider's region.
    dc_router_id str
    required string → Direct Connect Router ID to attach. Changing this creates a new resource
    gateway str
    required string → IP address of gateway. Changing this creates a new resource
    network str
    required string → Subnet in CIDR notation. Changing this creates a new resource
    description str
    optional string → Description of the static route
    metric float
    optional number → Metric to use for route. Default is 1
    name str
    optional string → Name of the static route
    region str
    optional string → The region to fetch availability zones from, defaults to the provider's region.
    dcRouterId String
    required string → Direct Connect Router ID to attach. Changing this creates a new resource
    gateway String
    required string → IP address of gateway. Changing this creates a new resource
    network String
    required string → Subnet in CIDR notation. Changing this creates a new resource
    description String
    optional string → Description of the static route
    metric Number
    optional number → Metric to use for route. Default is 1
    name String
    optional string → Name of the static route
    region String
    optional string → The region to fetch availability zones from, defaults to the provider's region.

    Outputs

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

    CreatedAt string
    string → Creation timestamp
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    string → Update timestamp
    CreatedAt string
    string → Creation timestamp
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    string → Update timestamp
    createdAt String
    string → Creation timestamp
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    string → Update timestamp
    createdAt string
    string → Creation timestamp
    id string
    The provider-assigned unique ID for this managed resource.
    updatedAt string
    string → Update timestamp
    created_at str
    string → Creation timestamp
    id str
    The provider-assigned unique ID for this managed resource.
    updated_at str
    string → Update timestamp
    createdAt String
    string → Creation timestamp
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    string → Update timestamp

    Look up Existing DcStaticRoute Resource

    Get an existing DcStaticRoute 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?: DcStaticRouteState, opts?: CustomResourceOptions): DcStaticRoute
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            dc_router_id: Optional[str] = None,
            description: Optional[str] = None,
            gateway: Optional[str] = None,
            metric: Optional[float] = None,
            name: Optional[str] = None,
            network: Optional[str] = None,
            region: Optional[str] = None,
            updated_at: Optional[str] = None) -> DcStaticRoute
    func GetDcStaticRoute(ctx *Context, name string, id IDInput, state *DcStaticRouteState, opts ...ResourceOption) (*DcStaticRoute, error)
    public static DcStaticRoute Get(string name, Input<string> id, DcStaticRouteState? state, CustomResourceOptions? opts = null)
    public static DcStaticRoute get(String name, Output<String> id, DcStaticRouteState state, CustomResourceOptions options)
    resources:  _:    type: vkcs:DcStaticRoute    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:
    CreatedAt string
    string → Creation timestamp
    DcRouterId string
    required string → Direct Connect Router ID to attach. Changing this creates a new resource
    Description string
    optional string → Description of the static route
    Gateway string
    required string → IP address of gateway. Changing this creates a new resource
    Metric double
    optional number → Metric to use for route. Default is 1
    Name string
    optional string → Name of the static route
    Network string
    required string → Subnet in CIDR notation. Changing this creates a new resource
    Region string
    optional string → The region to fetch availability zones from, defaults to the provider's region.
    UpdatedAt string
    string → Update timestamp
    CreatedAt string
    string → Creation timestamp
    DcRouterId string
    required string → Direct Connect Router ID to attach. Changing this creates a new resource
    Description string
    optional string → Description of the static route
    Gateway string
    required string → IP address of gateway. Changing this creates a new resource
    Metric float64
    optional number → Metric to use for route. Default is 1
    Name string
    optional string → Name of the static route
    Network string
    required string → Subnet in CIDR notation. Changing this creates a new resource
    Region string
    optional string → The region to fetch availability zones from, defaults to the provider's region.
    UpdatedAt string
    string → Update timestamp
    createdAt String
    string → Creation timestamp
    dcRouterId String
    required string → Direct Connect Router ID to attach. Changing this creates a new resource
    description String
    optional string → Description of the static route
    gateway String
    required string → IP address of gateway. Changing this creates a new resource
    metric Double
    optional number → Metric to use for route. Default is 1
    name String
    optional string → Name of the static route
    network String
    required string → Subnet in CIDR notation. Changing this creates a new resource
    region String
    optional string → The region to fetch availability zones from, defaults to the provider's region.
    updatedAt String
    string → Update timestamp
    createdAt string
    string → Creation timestamp
    dcRouterId string
    required string → Direct Connect Router ID to attach. Changing this creates a new resource
    description string
    optional string → Description of the static route
    gateway string
    required string → IP address of gateway. Changing this creates a new resource
    metric number
    optional number → Metric to use for route. Default is 1
    name string
    optional string → Name of the static route
    network string
    required string → Subnet in CIDR notation. Changing this creates a new resource
    region string
    optional string → The region to fetch availability zones from, defaults to the provider's region.
    updatedAt string
    string → Update timestamp
    created_at str
    string → Creation timestamp
    dc_router_id str
    required string → Direct Connect Router ID to attach. Changing this creates a new resource
    description str
    optional string → Description of the static route
    gateway str
    required string → IP address of gateway. Changing this creates a new resource
    metric float
    optional number → Metric to use for route. Default is 1
    name str
    optional string → Name of the static route
    network str
    required string → Subnet in CIDR notation. Changing this creates a new resource
    region str
    optional string → The region to fetch availability zones from, defaults to the provider's region.
    updated_at str
    string → Update timestamp
    createdAt String
    string → Creation timestamp
    dcRouterId String
    required string → Direct Connect Router ID to attach. Changing this creates a new resource
    description String
    optional string → Description of the static route
    gateway String
    required string → IP address of gateway. Changing this creates a new resource
    metric Number
    optional number → Metric to use for route. Default is 1
    name String
    optional string → Name of the static route
    network String
    required string → Subnet in CIDR notation. Changing this creates a new resource
    region String
    optional string → The region to fetch availability zones from, defaults to the provider's region.
    updatedAt String
    string → Update timestamp

    Import

    Direct connect BGP instance can be imported using the id, e.g.

    $ pulumi import vkcs:index/dcStaticRoute:DcStaticRoute mydcstaticroute 2ee73dd1-d52a-4c3f-9041-c60900c154a4
    

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

    Package Details

    Repository
    vkcs vk-cs/terraform-provider-vkcs
    License
    Notes
    This Pulumi package is based on the vkcs Terraform Provider.
    vkcs logo
    vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs