1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. StaticRoute
Cloudflare v6.2.0 published on Tuesday, May 13, 2025 by Pulumi

cloudflare.StaticRoute

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.2.0 published on Tuesday, May 13, 2025 by Pulumi
    Deprecated: cloudflare.index/staticroute.StaticRoute has been deprecated in favor of cloudflare.index/magicwanstaticroute.MagicWanStaticRoute

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    resources:
      exampleMagicWanStaticRoute:
        type: cloudflare:MagicWanStaticRoute
        name: example_magic_wan_static_route
        properties:
          accountId: 023e105f4ecef8ad9ca31a8372d0c353
          nexthop: 203.0.113.1
          prefix: 192.0.2.0/24
          priority: 0
          description: New route for new prefix 203.0.113.1
          scope:
            colo_names:
              - den01
            colo_regions:
              - APAC
          weight: 0
    

    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,
                    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
    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.
    Description string
    An optional human provided description of the static route.
    Route StaticRouteRoute
    Scope StaticRouteScope
    Used only for ECMP routes.
    Weight int
    Optional weight of the ECMP scope - if provided.
    AccountId string
    Identifier
    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.
    Description string
    An optional human provided description of the static route.
    Route StaticRouteRouteArgs
    Scope StaticRouteScopeArgs
    Used only for ECMP routes.
    Weight int
    Optional weight of the ECMP scope - if provided.
    accountId String
    Identifier
    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.
    description String
    An optional human provided description of the static route.
    route StaticRouteRoute
    scope StaticRouteScope
    Used only for ECMP routes.
    weight Integer
    Optional weight of the ECMP scope - if provided.
    accountId string
    Identifier
    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.
    description string
    An optional human provided description of the static route.
    route StaticRouteRoute
    scope StaticRouteScope
    Used only for ECMP routes.
    weight number
    Optional weight of the ECMP scope - if provided.
    account_id str
    Identifier
    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.
    description str
    An optional human provided description of the static route.
    route StaticRouteRouteArgs
    scope StaticRouteScopeArgs
    Used only for ECMP routes.
    weight int
    Optional weight of the ECMP scope - if provided.
    accountId String
    Identifier
    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.
    description String
    An optional human provided description of the static route.
    route 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:

    CreatedOn string
    When the route was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Modified bool
    ModifiedOn string
    When the route was last modified.
    ModifiedRoute StaticRouteModifiedRoute
    CreatedOn string
    When the route was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Modified bool
    ModifiedOn string
    When the route was last modified.
    ModifiedRoute StaticRouteModifiedRoute
    createdOn String
    When the route was created.
    id String
    The provider-assigned unique ID for this managed resource.
    modified Boolean
    modifiedOn String
    When the route was last modified.
    modifiedRoute StaticRouteModifiedRoute
    createdOn string
    When the route was created.
    id string
    The provider-assigned unique ID for this managed resource.
    modified boolean
    modifiedOn string
    When the route was last modified.
    modifiedRoute StaticRouteModifiedRoute
    created_on str
    When the route was created.
    id str
    The provider-assigned unique ID for this managed resource.
    modified bool
    modified_on str
    When the route was last modified.
    modified_route StaticRouteModifiedRoute
    createdOn String
    When the route was created.
    id String
    The provider-assigned unique ID for this managed resource.
    modified Boolean
    modifiedOn String
    When the route was last modified.
    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,
            created_on: Optional[str] = None,
            description: Optional[str] = None,
            modified: Optional[bool] = None,
            modified_on: Optional[str] = None,
            modified_route: Optional[StaticRouteModifiedRouteArgs] = None,
            nexthop: Optional[str] = None,
            prefix: Optional[str] = None,
            priority: Optional[int] = None,
            route: Optional[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
    CreatedOn string
    When the route was created.
    Description string
    An optional human provided description of the static route.
    Modified bool
    ModifiedOn string
    When the route was last modified.
    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
    Scope StaticRouteScope
    Used only for ECMP routes.
    Weight int
    Optional weight of the ECMP scope - if provided.
    AccountId string
    Identifier
    CreatedOn string
    When the route was created.
    Description string
    An optional human provided description of the static route.
    Modified bool
    ModifiedOn string
    When the route was last modified.
    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
    Scope StaticRouteScopeArgs
    Used only for ECMP routes.
    Weight int
    Optional weight of the ECMP scope - if provided.
    accountId String
    Identifier
    createdOn String
    When the route was created.
    description String
    An optional human provided description of the static route.
    modified Boolean
    modifiedOn String
    When the route was last modified.
    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
    scope StaticRouteScope
    Used only for ECMP routes.
    weight Integer
    Optional weight of the ECMP scope - if provided.
    accountId string
    Identifier
    createdOn string
    When the route was created.
    description string
    An optional human provided description of the static route.
    modified boolean
    modifiedOn string
    When the route was last modified.
    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
    scope StaticRouteScope
    Used only for ECMP routes.
    weight number
    Optional weight of the ECMP scope - if provided.
    account_id str
    Identifier
    created_on str
    When the route was created.
    description str
    An optional human provided description of the static route.
    modified bool
    modified_on str
    When the route was last modified.
    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
    scope StaticRouteScopeArgs
    Used only for ECMP routes.
    weight int
    Optional weight of the ECMP scope - if provided.
    accountId String
    Identifier
    createdOn String
    When the route was created.
    description String
    An optional human provided description of the static route.
    modified Boolean
    modifiedOn String
    When the route was last modified.
    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
    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.

    Import

    $ pulumi import cloudflare:index/staticRoute:StaticRoute example '<account_id>/<route_id>'
    

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

    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.2.0 published on Tuesday, May 13, 2025 by Pulumi