StaticRouteArgs

data class StaticRouteArgs(val accountId: Output<String>? = null, val coloNames: Output<List<String>>? = null, val coloRegions: Output<List<String>>? = null, val description: Output<String>? = null, val nexthop: Output<String>? = null, val prefix: Output<String>? = null, val priority: Output<Int>? = null, val weight: Output<Int>? = null) : ConvertibleToJava<StaticRouteArgs>

Provides a resource, that manages Cloudflare static routes for Magic Transit or Magic WAN. Static routes are used to route traffic through GRE tunnels.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const example = new cloudflare.StaticRoute("example", {
accountId: "f037e56e89293a057740de681ac9abbe",
description: "New route for new prefix 192.0.2.0/24",
prefix: "192.0.2.0/24",
nexthop: "10.0.0.0",
priority: 100,
weight: 10,
coloNames: ["den01"],
coloRegions: ["APAC"],
});
import pulumi
import pulumi_cloudflare as cloudflare
example = cloudflare.StaticRoute("example",
account_id="f037e56e89293a057740de681ac9abbe",
description="New route for new prefix 192.0.2.0/24",
prefix="192.0.2.0/24",
nexthop="10.0.0.0",
priority=100,
weight=10,
colo_names=["den01"],
colo_regions=["APAC"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var example = new Cloudflare.StaticRoute("example", new()
{
AccountId = "f037e56e89293a057740de681ac9abbe",
Description = "New route for new prefix 192.0.2.0/24",
Prefix = "192.0.2.0/24",
Nexthop = "10.0.0.0",
Priority = 100,
Weight = 10,
ColoNames = new[]
{
"den01",
},
ColoRegions = new[]
{
"APAC",
},
});
});
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewStaticRoute(ctx, "example", &cloudflare.StaticRouteArgs{
AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
Description: pulumi.String("New route for new prefix 192.0.2.0/24"),
Prefix: pulumi.String("192.0.2.0/24"),
Nexthop: pulumi.String("10.0.0.0"),
Priority: pulumi.Int(100),
Weight: pulumi.Int(10),
ColoNames: pulumi.StringArray{
pulumi.String("den01"),
},
ColoRegions: pulumi.StringArray{
pulumi.String("APAC"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.StaticRoute;
import com.pulumi.cloudflare.StaticRouteArgs;
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 example = new StaticRoute("example", StaticRouteArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.description("New route for new prefix 192.0.2.0/24")
.prefix("192.0.2.0/24")
.nexthop("10.0.0.0")
.priority(100)
.weight(10)
.coloNames("den01")
.coloRegions("APAC")
.build());
}
}
resources:
example:
type: cloudflare:StaticRoute
properties:
accountId: f037e56e89293a057740de681ac9abbe
description: New route for new prefix 192.0.2.0/24
prefix: 192.0.2.0/24
nexthop: 10.0.0.0
priority: 100
weight: 10
coloNames:
- den01
coloRegions:
- APAC

Import

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

Constructors

Link copied to clipboard
constructor(accountId: Output<String>? = null, coloNames: Output<List<String>>? = null, coloRegions: Output<List<String>>? = null, description: Output<String>? = null, nexthop: Output<String>? = null, prefix: Output<String>? = null, priority: Output<Int>? = null, weight: Output<Int>? = null)

Properties

Link copied to clipboard
val accountId: Output<String>? = null

The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.

Link copied to clipboard
val coloNames: Output<List<String>>? = null

List of Cloudflare colocation regions for this static route.

Link copied to clipboard
val coloRegions: Output<List<String>>? = null

List of Cloudflare colocation names for this static route.

Link copied to clipboard
val description: Output<String>? = null

Description of the static route.

Link copied to clipboard
val nexthop: Output<String>? = null

The nexthop IP address where traffic will be routed to.

Link copied to clipboard
val prefix: Output<String>? = null

Your network prefix using CIDR notation.

Link copied to clipboard
val priority: Output<Int>? = null

The priority for the static route.

Link copied to clipboard
val weight: Output<Int>? = null

The optional weight for ECMP routes. Modifying this attribute will force creation of a new resource.

Functions

Link copied to clipboard
open override fun toJava(): StaticRouteArgs