Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi
cloudflare.StaticRoute
Explore with Pulumi AI
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:
- Account
Id 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
Static
Route Route - Route
Id string - Identifier
- Routes
List<Static
Route Route> - Scope
Static
Route Scope - Used only for ECMP routes.
- Weight int
- Optional weight of the ECMP scope - if provided.
- Account
Id 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
Static
Route Route Args - Route
Id string - Identifier
- Routes
[]Static
Route Route Args - Scope
Static
Route Scope Args - Used only for ECMP routes.
- Weight int
- Optional weight of the ECMP scope - if provided.
- account
Id 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
Static
Route Route - route
Id String - Identifier
- routes
List<Static
Route Route> - scope
Static
Route Scope - Used only for ECMP routes.
- weight Integer
- Optional weight of the ECMP scope - if provided.
- account
Id 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
Static
Route Route - route
Id string - Identifier
- routes
Static
Route Route[] - scope
Static
Route Scope - 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
Static
Route Route Args - route_
id str - Identifier
- routes
Sequence[Static
Route Route Args] - scope
Static
Route Scope Args - Used only for ECMP routes.
- weight int
- Optional weight of the ECMP scope - if provided.
- account
Id 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
- route
Id 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
- Modified
Route StaticRoute Modified Route
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified bool
- Modified
Route StaticRoute Modified Route
- id String
- The provider-assigned unique ID for this managed resource.
- modified Boolean
- modified
Route StaticRoute Modified Route
- id string
- The provider-assigned unique ID for this managed resource.
- modified boolean
- modified
Route StaticRoute Modified Route
- id str
- The provider-assigned unique ID for this managed resource.
- modified bool
- modified_
route StaticRoute Modified Route
- id String
- The provider-assigned unique ID for this managed resource.
- modified Boolean
- modified
Route 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.
- Account
Id string - Identifier
- Description string
- An optional human provided description of the static route.
- Modified bool
- Modified
Route StaticRoute Modified 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
Static
Route Route - Route
Id string - Identifier
- Routes
List<Static
Route Route> - Scope
Static
Route Scope - Used only for ECMP routes.
- Weight int
- Optional weight of the ECMP scope - if provided.
- Account
Id string - Identifier
- Description string
- An optional human provided description of the static route.
- Modified bool
- Modified
Route StaticRoute Modified Route Args - 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
Static
Route Route Args - Route
Id string - Identifier
- Routes
[]Static
Route Route Args - Scope
Static
Route Scope Args - Used only for ECMP routes.
- Weight int
- Optional weight of the ECMP scope - if provided.
- account
Id String - Identifier
- description String
- An optional human provided description of the static route.
- modified Boolean
- modified
Route StaticRoute Modified 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
Static
Route Route - route
Id String - Identifier
- routes
List<Static
Route Route> - scope
Static
Route Scope - Used only for ECMP routes.
- weight Integer
- Optional weight of the ECMP scope - if provided.
- account
Id string - Identifier
- description string
- An optional human provided description of the static route.
- modified boolean
- modified
Route StaticRoute Modified 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
Static
Route Route - route
Id string - Identifier
- routes
Static
Route Route[] - scope
Static
Route Scope - 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 StaticRoute Modified Route Args - 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
Static
Route Route Args - route_
id str - Identifier
- routes
Sequence[Static
Route Route Args] - scope
Static
Route Scope Args - Used only for ECMP routes.
- weight int
- Optional weight of the ECMP scope - if provided.
- account
Id String - Identifier
- description String
- An optional human provided description of the static route.
- modified Boolean
- modified
Route 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
- route
Id 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
- Created
On string - When the route was created.
- Description string
- An optional human provided description of the static route.
- Id string
- Identifier
- Modified
On 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
Static
Route Modified Route Scope - Used only for ECMP routes.
- Weight int
- Optional weight of the ECMP scope - if provided.
- Created
On string - When the route was created.
- Description string
- An optional human provided description of the static route.
- Id string
- Identifier
- Modified
On 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
Static
Route Modified Route Scope - Used only for ECMP routes.
- Weight int
- Optional weight of the ECMP scope - if provided.
- created
On String - When the route was created.
- description String
- An optional human provided description of the static route.
- id String
- Identifier
- modified
On 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
Static
Route Modified Route Scope - Used only for ECMP routes.
- weight Integer
- Optional weight of the ECMP scope - if provided.
- created
On string - When the route was created.
- description string
- An optional human provided description of the static route.
- id string
- Identifier
- modified
On 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
Static
Route Modified Route Scope - 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
Static
Route Modified Route Scope - Used only for ECMP routes.
- weight int
- Optional weight of the ECMP scope - if provided.
- created
On String - When the route was created.
- description String
- An optional human provided description of the static route.
- id String
- Identifier
- modified
On 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
- Colo
Names List<string> - List of colo names for the ECMP scope.
- Colo
Regions List<string> - List of colo regions for the ECMP scope.
- Colo
Names []string - List of colo names for the ECMP scope.
- Colo
Regions []string - List of colo regions for the ECMP scope.
- colo
Names List<String> - List of colo names for the ECMP scope.
- colo
Regions List<String> - List of colo regions for the ECMP scope.
- colo
Names string[] - List of colo names for the ECMP scope.
- colo
Regions 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.
- colo
Names List<String> - List of colo names for the ECMP scope.
- colo
Regions List<String> - List of colo regions for the ECMP scope.
StaticRouteRoute, StaticRouteRouteArgs
- Created
On string - When the route was created.
- Description string
- An optional human provided description of the static route.
- Id string
- Identifier
- Modified
On 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
Static
Route Route Scope - Used only for ECMP routes.
- Weight int
- Optional weight of the ECMP scope - if provided.
- Created
On string - When the route was created.
- Description string
- An optional human provided description of the static route.
- Id string
- Identifier
- Modified
On 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
Static
Route Route Scope - Used only for ECMP routes.
- Weight int
- Optional weight of the ECMP scope - if provided.
- created
On String - When the route was created.
- description String
- An optional human provided description of the static route.
- id String
- Identifier
- modified
On 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
Static
Route Route Scope - Used only for ECMP routes.
- weight Integer
- Optional weight of the ECMP scope - if provided.
- created
On string - When the route was created.
- description string
- An optional human provided description of the static route.
- id string
- Identifier
- modified
On 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
Static
Route Route Scope - 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
Static
Route Route Scope - Used only for ECMP routes.
- weight int
- Optional weight of the ECMP scope - if provided.
- created
On String - When the route was created.
- description String
- An optional human provided description of the static route.
- id String
- Identifier
- modified
On 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
- Colo
Names List<string> - List of colo names for the ECMP scope.
- Colo
Regions List<string> - List of colo regions for the ECMP scope.
- Colo
Names []string - List of colo names for the ECMP scope.
- Colo
Regions []string - List of colo regions for the ECMP scope.
- colo
Names List<String> - List of colo names for the ECMP scope.
- colo
Regions List<String> - List of colo regions for the ECMP scope.
- colo
Names string[] - List of colo names for the ECMP scope.
- colo
Regions 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.
- colo
Names List<String> - List of colo names for the ECMP scope.
- colo
Regions List<String> - List of colo regions for the ECMP scope.
StaticRouteScope, StaticRouteScopeArgs
- Colo
Names List<string> - List of colo names for the ECMP scope.
- Colo
Regions List<string> - List of colo regions for the ECMP scope.
- Colo
Names []string - List of colo names for the ECMP scope.
- Colo
Regions []string - List of colo regions for the ECMP scope.
- colo
Names List<String> - List of colo names for the ECMP scope.
- colo
Regions List<String> - List of colo regions for the ECMP scope.
- colo
Names string[] - List of colo names for the ECMP scope.
- colo
Regions 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.
- colo
Names List<String> - List of colo names for the ECMP scope.
- colo
Regions 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.