1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. StaticRoute
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.StaticRoute

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi
    Deprecated: cloudflare.index/staticroute.StaticRoute has been deprecated in favor of cloudflare.index/magicwanstaticroute.MagicWanStaticRoute

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleMagicWanStaticRoute = new cloudflare.MagicWanStaticRoute("example_magic_wan_static_route", {accountId: "023e105f4ecef8ad9ca31a8372d0c353"});
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_magic_wan_static_route = cloudflare.MagicWanStaticRoute("example_magic_wan_static_route", account_id="023e105f4ecef8ad9ca31a8372d0c353")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.NewMagicWanStaticRoute(ctx, "example_magic_wan_static_route", &cloudflare.MagicWanStaticRouteArgs{
    			AccountId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleMagicWanStaticRoute = new Cloudflare.MagicWanStaticRoute("example_magic_wan_static_route", new()
        {
            AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.MagicWanStaticRoute;
    import com.pulumi.cloudflare.MagicWanStaticRouteArgs;
    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 exampleMagicWanStaticRoute = new MagicWanStaticRoute("exampleMagicWanStaticRoute", MagicWanStaticRouteArgs.builder()
                .accountId("023e105f4ecef8ad9ca31a8372d0c353")
                .build());
    
        }
    }
    
    resources:
      exampleMagicWanStaticRoute:
        type: cloudflare:MagicWanStaticRoute
        name: example_magic_wan_static_route
        properties:
          accountId: 023e105f4ecef8ad9ca31a8372d0c353
    

    Create StaticRoute Resource

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

    Constructor syntax

    new StaticRoute(name: string, args: StaticRouteArgs, opts?: CustomResourceOptions);
    @overload
    def StaticRoute(resource_name: str,
                    args: StaticRouteArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def StaticRoute(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    account_id: Optional[str] = None,
                    description: Optional[str] = None,
                    nexthop: Optional[str] = None,
                    prefix: Optional[str] = None,
                    priority: Optional[int] = None,
                    route: Optional[StaticRouteRouteArgs] = None,
                    route_id: Optional[str] = None,
                    routes: Optional[Sequence[StaticRouteRouteArgs]] = None,
                    scope: Optional[StaticRouteScopeArgs] = None,
                    weight: Optional[int] = None)
    func NewStaticRoute(ctx *Context, name string, args StaticRouteArgs, opts ...ResourceOption) (*StaticRoute, error)
    public StaticRoute(string name, StaticRouteArgs args, CustomResourceOptions? opts = null)
    public StaticRoute(String name, StaticRouteArgs args)
    public StaticRoute(String name, StaticRouteArgs args, CustomResourceOptions options)
    
    type: cloudflare:StaticRoute
    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 StaticRouteArgs
    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 StaticRouteArgs
    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 StaticRouteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args StaticRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args StaticRouteArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    AccountId string
    Identifier
    Description string
    An optional human provided description of the static route.
    Nexthop string
    The next-hop IP Address for the static route.
    Prefix string
    IP Prefix in Classless Inter-Domain Routing format.
    Priority int
    Priority of the static route.
    Route StaticRouteRoute
    RouteId string
    Identifier
    Routes List<StaticRouteRoute>
    Scope StaticRouteScope
    Used only for ECMP routes.
    Weight int
    Optional weight of the ECMP scope - if provided.
    AccountId string
    Identifier
    Description string
    An optional human provided description of the static route.
    Nexthop string
    The next-hop IP Address for the static route.
    Prefix string
    IP Prefix in Classless Inter-Domain Routing format.
    Priority int
    Priority of the static route.
    Route StaticRouteRouteArgs
    RouteId string
    Identifier
    Routes []StaticRouteRouteArgs
    Scope StaticRouteScopeArgs
    Used only for ECMP routes.
    Weight int
    Optional weight of the ECMP scope - if provided.
    accountId String
    Identifier
    description String
    An optional human provided description of the static route.
    nexthop String
    The next-hop IP Address for the static route.
    prefix String
    IP Prefix in Classless Inter-Domain Routing format.
    priority Integer
    Priority of the static route.
    route StaticRouteRoute
    routeId String
    Identifier
    routes List<StaticRouteRoute>
    scope StaticRouteScope
    Used only for ECMP routes.
    weight Integer
    Optional weight of the ECMP scope - if provided.
    accountId string
    Identifier
    description string
    An optional human provided description of the static route.
    nexthop string
    The next-hop IP Address for the static route.
    prefix string
    IP Prefix in Classless Inter-Domain Routing format.
    priority number
    Priority of the static route.
    route StaticRouteRoute
    routeId string
    Identifier
    routes StaticRouteRoute[]
    scope StaticRouteScope
    Used only for ECMP routes.
    weight number
    Optional weight of the ECMP scope - if provided.
    account_id str
    Identifier
    description str
    An optional human provided description of the static route.
    nexthop str
    The next-hop IP Address for the static route.
    prefix str
    IP Prefix in Classless Inter-Domain Routing format.
    priority int
    Priority of the static route.
    route StaticRouteRouteArgs
    route_id str
    Identifier
    routes Sequence[StaticRouteRouteArgs]
    scope StaticRouteScopeArgs
    Used only for ECMP routes.
    weight int
    Optional weight of the ECMP scope - if provided.
    accountId String
    Identifier
    description String
    An optional human provided description of the static route.
    nexthop String
    The next-hop IP Address for the static route.
    prefix String
    IP Prefix in Classless Inter-Domain Routing format.
    priority Number
    Priority of the static route.
    route Property Map
    routeId String
    Identifier
    routes List<Property Map>
    scope Property Map
    Used only for ECMP routes.
    weight Number
    Optional weight of the ECMP scope - if provided.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Modified bool
    ModifiedRoute StaticRouteModifiedRoute
    Id string
    The provider-assigned unique ID for this managed resource.
    Modified bool
    ModifiedRoute StaticRouteModifiedRoute
    id String
    The provider-assigned unique ID for this managed resource.
    modified Boolean
    modifiedRoute StaticRouteModifiedRoute
    id string
    The provider-assigned unique ID for this managed resource.
    modified boolean
    modifiedRoute StaticRouteModifiedRoute
    id str
    The provider-assigned unique ID for this managed resource.
    modified bool
    modified_route StaticRouteModifiedRoute
    id String
    The provider-assigned unique ID for this managed resource.
    modified Boolean
    modifiedRoute Property Map

    Look up Existing StaticRoute Resource

    Get an existing StaticRoute 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?: StaticRouteState, opts?: CustomResourceOptions): StaticRoute
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            description: Optional[str] = None,
            modified: Optional[bool] = None,
            modified_route: Optional[StaticRouteModifiedRouteArgs] = None,
            nexthop: Optional[str] = None,
            prefix: Optional[str] = None,
            priority: Optional[int] = None,
            route: Optional[StaticRouteRouteArgs] = None,
            route_id: Optional[str] = None,
            routes: Optional[Sequence[StaticRouteRouteArgs]] = None,
            scope: Optional[StaticRouteScopeArgs] = None,
            weight: Optional[int] = None) -> StaticRoute
    func GetStaticRoute(ctx *Context, name string, id IDInput, state *StaticRouteState, opts ...ResourceOption) (*StaticRoute, error)
    public static StaticRoute Get(string name, Input<string> id, StaticRouteState? state, CustomResourceOptions? opts = null)
    public static StaticRoute get(String name, Output<String> id, StaticRouteState state, CustomResourceOptions options)
    resources:  _:    type: cloudflare:StaticRoute    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:
    AccountId string
    Identifier
    Description string
    An optional human provided description of the static route.
    Modified bool
    ModifiedRoute StaticRouteModifiedRoute
    Nexthop string
    The next-hop IP Address for the static route.
    Prefix string
    IP Prefix in Classless Inter-Domain Routing format.
    Priority int
    Priority of the static route.
    Route StaticRouteRoute
    RouteId string
    Identifier
    Routes List<StaticRouteRoute>
    Scope StaticRouteScope
    Used only for ECMP routes.
    Weight int
    Optional weight of the ECMP scope - if provided.
    AccountId string
    Identifier
    Description string
    An optional human provided description of the static route.
    Modified bool
    ModifiedRoute StaticRouteModifiedRouteArgs
    Nexthop string
    The next-hop IP Address for the static route.
    Prefix string
    IP Prefix in Classless Inter-Domain Routing format.
    Priority int
    Priority of the static route.
    Route StaticRouteRouteArgs
    RouteId string
    Identifier
    Routes []StaticRouteRouteArgs
    Scope StaticRouteScopeArgs
    Used only for ECMP routes.
    Weight int
    Optional weight of the ECMP scope - if provided.
    accountId String
    Identifier
    description String
    An optional human provided description of the static route.
    modified Boolean
    modifiedRoute StaticRouteModifiedRoute
    nexthop String
    The next-hop IP Address for the static route.
    prefix String
    IP Prefix in Classless Inter-Domain Routing format.
    priority Integer
    Priority of the static route.
    route StaticRouteRoute
    routeId String
    Identifier
    routes List<StaticRouteRoute>
    scope StaticRouteScope
    Used only for ECMP routes.
    weight Integer
    Optional weight of the ECMP scope - if provided.
    accountId string
    Identifier
    description string
    An optional human provided description of the static route.
    modified boolean
    modifiedRoute StaticRouteModifiedRoute
    nexthop string
    The next-hop IP Address for the static route.
    prefix string
    IP Prefix in Classless Inter-Domain Routing format.
    priority number
    Priority of the static route.
    route StaticRouteRoute
    routeId string
    Identifier
    routes StaticRouteRoute[]
    scope StaticRouteScope
    Used only for ECMP routes.
    weight number
    Optional weight of the ECMP scope - if provided.
    account_id str
    Identifier
    description str
    An optional human provided description of the static route.
    modified bool
    modified_route StaticRouteModifiedRouteArgs
    nexthop str
    The next-hop IP Address for the static route.
    prefix str
    IP Prefix in Classless Inter-Domain Routing format.
    priority int
    Priority of the static route.
    route StaticRouteRouteArgs
    route_id str
    Identifier
    routes Sequence[StaticRouteRouteArgs]
    scope StaticRouteScopeArgs
    Used only for ECMP routes.
    weight int
    Optional weight of the ECMP scope - if provided.
    accountId String
    Identifier
    description String
    An optional human provided description of the static route.
    modified Boolean
    modifiedRoute Property Map
    nexthop String
    The next-hop IP Address for the static route.
    prefix String
    IP Prefix in Classless Inter-Domain Routing format.
    priority Number
    Priority of the static route.
    route Property Map
    routeId String
    Identifier
    routes List<Property Map>
    scope Property Map
    Used only for ECMP routes.
    weight Number
    Optional weight of the ECMP scope - if provided.

    Supporting Types

    StaticRouteModifiedRoute, StaticRouteModifiedRouteArgs

    CreatedOn string
    When the route was created.
    Description string
    An optional human provided description of the static route.
    Id string
    Identifier
    ModifiedOn string
    When the route was last modified.
    Nexthop string
    The next-hop IP Address for the static route.
    Prefix string
    IP Prefix in Classless Inter-Domain Routing format.
    Priority int
    Priority of the static route.
    Scope StaticRouteModifiedRouteScope
    Used only for ECMP routes.
    Weight int
    Optional weight of the ECMP scope - if provided.
    CreatedOn string
    When the route was created.
    Description string
    An optional human provided description of the static route.
    Id string
    Identifier
    ModifiedOn string
    When the route was last modified.
    Nexthop string
    The next-hop IP Address for the static route.
    Prefix string
    IP Prefix in Classless Inter-Domain Routing format.
    Priority int
    Priority of the static route.
    Scope StaticRouteModifiedRouteScope
    Used only for ECMP routes.
    Weight int
    Optional weight of the ECMP scope - if provided.
    createdOn String
    When the route was created.
    description String
    An optional human provided description of the static route.
    id String
    Identifier
    modifiedOn String
    When the route was last modified.
    nexthop String
    The next-hop IP Address for the static route.
    prefix String
    IP Prefix in Classless Inter-Domain Routing format.
    priority Integer
    Priority of the static route.
    scope StaticRouteModifiedRouteScope
    Used only for ECMP routes.
    weight Integer
    Optional weight of the ECMP scope - if provided.
    createdOn string
    When the route was created.
    description string
    An optional human provided description of the static route.
    id string
    Identifier
    modifiedOn string
    When the route was last modified.
    nexthop string
    The next-hop IP Address for the static route.
    prefix string
    IP Prefix in Classless Inter-Domain Routing format.
    priority number
    Priority of the static route.
    scope StaticRouteModifiedRouteScope
    Used only for ECMP routes.
    weight number
    Optional weight of the ECMP scope - if provided.
    created_on str
    When the route was created.
    description str
    An optional human provided description of the static route.
    id str
    Identifier
    modified_on str
    When the route was last modified.
    nexthop str
    The next-hop IP Address for the static route.
    prefix str
    IP Prefix in Classless Inter-Domain Routing format.
    priority int
    Priority of the static route.
    scope StaticRouteModifiedRouteScope
    Used only for ECMP routes.
    weight int
    Optional weight of the ECMP scope - if provided.
    createdOn String
    When the route was created.
    description String
    An optional human provided description of the static route.
    id String
    Identifier
    modifiedOn String
    When the route was last modified.
    nexthop String
    The next-hop IP Address for the static route.
    prefix String
    IP Prefix in Classless Inter-Domain Routing format.
    priority Number
    Priority of the static route.
    scope Property Map
    Used only for ECMP routes.
    weight Number
    Optional weight of the ECMP scope - if provided.

    StaticRouteModifiedRouteScope, StaticRouteModifiedRouteScopeArgs

    ColoNames List<string>
    List of colo names for the ECMP scope.
    ColoRegions List<string>
    List of colo regions for the ECMP scope.
    ColoNames []string
    List of colo names for the ECMP scope.
    ColoRegions []string
    List of colo regions for the ECMP scope.
    coloNames List<String>
    List of colo names for the ECMP scope.
    coloRegions List<String>
    List of colo regions for the ECMP scope.
    coloNames string[]
    List of colo names for the ECMP scope.
    coloRegions string[]
    List of colo regions for the ECMP scope.
    colo_names Sequence[str]
    List of colo names for the ECMP scope.
    colo_regions Sequence[str]
    List of colo regions for the ECMP scope.
    coloNames List<String>
    List of colo names for the ECMP scope.
    coloRegions List<String>
    List of colo regions for the ECMP scope.

    StaticRouteRoute, StaticRouteRouteArgs

    CreatedOn string
    When the route was created.
    Description string
    An optional human provided description of the static route.
    Id string
    Identifier
    ModifiedOn string
    When the route was last modified.
    Nexthop string
    The next-hop IP Address for the static route.
    Prefix string
    IP Prefix in Classless Inter-Domain Routing format.
    Priority int
    Priority of the static route.
    Scope StaticRouteRouteScope
    Used only for ECMP routes.
    Weight int
    Optional weight of the ECMP scope - if provided.
    CreatedOn string
    When the route was created.
    Description string
    An optional human provided description of the static route.
    Id string
    Identifier
    ModifiedOn string
    When the route was last modified.
    Nexthop string
    The next-hop IP Address for the static route.
    Prefix string
    IP Prefix in Classless Inter-Domain Routing format.
    Priority int
    Priority of the static route.
    Scope StaticRouteRouteScope
    Used only for ECMP routes.
    Weight int
    Optional weight of the ECMP scope - if provided.
    createdOn String
    When the route was created.
    description String
    An optional human provided description of the static route.
    id String
    Identifier
    modifiedOn String
    When the route was last modified.
    nexthop String
    The next-hop IP Address for the static route.
    prefix String
    IP Prefix in Classless Inter-Domain Routing format.
    priority Integer
    Priority of the static route.
    scope StaticRouteRouteScope
    Used only for ECMP routes.
    weight Integer
    Optional weight of the ECMP scope - if provided.
    createdOn string
    When the route was created.
    description string
    An optional human provided description of the static route.
    id string
    Identifier
    modifiedOn string
    When the route was last modified.
    nexthop string
    The next-hop IP Address for the static route.
    prefix string
    IP Prefix in Classless Inter-Domain Routing format.
    priority number
    Priority of the static route.
    scope StaticRouteRouteScope
    Used only for ECMP routes.
    weight number
    Optional weight of the ECMP scope - if provided.
    created_on str
    When the route was created.
    description str
    An optional human provided description of the static route.
    id str
    Identifier
    modified_on str
    When the route was last modified.
    nexthop str
    The next-hop IP Address for the static route.
    prefix str
    IP Prefix in Classless Inter-Domain Routing format.
    priority int
    Priority of the static route.
    scope StaticRouteRouteScope
    Used only for ECMP routes.
    weight int
    Optional weight of the ECMP scope - if provided.
    createdOn String
    When the route was created.
    description String
    An optional human provided description of the static route.
    id String
    Identifier
    modifiedOn String
    When the route was last modified.
    nexthop String
    The next-hop IP Address for the static route.
    prefix String
    IP Prefix in Classless Inter-Domain Routing format.
    priority Number
    Priority of the static route.
    scope Property Map
    Used only for ECMP routes.
    weight Number
    Optional weight of the ECMP scope - if provided.

    StaticRouteRouteScope, StaticRouteRouteScopeArgs

    ColoNames List<string>
    List of colo names for the ECMP scope.
    ColoRegions List<string>
    List of colo regions for the ECMP scope.
    ColoNames []string
    List of colo names for the ECMP scope.
    ColoRegions []string
    List of colo regions for the ECMP scope.
    coloNames List<String>
    List of colo names for the ECMP scope.
    coloRegions List<String>
    List of colo regions for the ECMP scope.
    coloNames string[]
    List of colo names for the ECMP scope.
    coloRegions string[]
    List of colo regions for the ECMP scope.
    colo_names Sequence[str]
    List of colo names for the ECMP scope.
    colo_regions Sequence[str]
    List of colo regions for the ECMP scope.
    coloNames List<String>
    List of colo names for the ECMP scope.
    coloRegions List<String>
    List of colo regions for the ECMP scope.

    StaticRouteScope, StaticRouteScopeArgs

    ColoNames List<string>
    List of colo names for the ECMP scope.
    ColoRegions List<string>
    List of colo regions for the ECMP scope.
    ColoNames []string
    List of colo names for the ECMP scope.
    ColoRegions []string
    List of colo regions for the ECMP scope.
    coloNames List<String>
    List of colo names for the ECMP scope.
    coloRegions List<String>
    List of colo regions for the ECMP scope.
    coloNames string[]
    List of colo names for the ECMP scope.
    coloRegions string[]
    List of colo regions for the ECMP scope.
    colo_names Sequence[str]
    List of colo names for the ECMP scope.
    colo_regions Sequence[str]
    List of colo regions for the ECMP scope.
    coloNames List<String>
    List of colo names for the ECMP scope.
    coloRegions List<String>
    List of colo regions for the ECMP scope.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi