1. Packages
  2. Fortios
  3. API Docs
  4. networking
  5. RouteStatic
Fortios v0.0.6 published on Tuesday, Jul 9, 2024 by pulumiverse

fortios.networking.RouteStatic

Explore with Pulumi AI

Provides a resource to configure static route of FortiOS.

!> Warning: The resource will be deprecated and replaced by new resource fortios.router.Static, we recommend that you use the new resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as fortios from "@pulumiverse/fortios";

const subnet = new fortios.networking.RouteStatic("subnet", {
    blackhole: "disable",
    comment: "Terraform test",
    device: "port2",
    distance: "22",
    dst: "110.2.2.122/32",
    gateway: "2.2.2.2",
    priority: "3",
    status: "enable",
    weight: "3",
});
const internetService = new fortios.networking.RouteStatic("internetService", {
    blackhole: "disable",
    comment: "Terraform Test",
    device: "port2",
    distance: "22",
    gateway: "2.2.2.2",
    internetService: 5242881,
    priority: "3",
    status: "enable",
    weight: "3",
});
Copy
import pulumi
import pulumiverse_fortios as fortios

subnet = fortios.networking.RouteStatic("subnet",
    blackhole="disable",
    comment="Terraform test",
    device="port2",
    distance="22",
    dst="110.2.2.122/32",
    gateway="2.2.2.2",
    priority="3",
    status="enable",
    weight="3")
internet_service = fortios.networking.RouteStatic("internetService",
    blackhole="disable",
    comment="Terraform Test",
    device="port2",
    distance="22",
    gateway="2.2.2.2",
    internet_service=5242881,
    priority="3",
    status="enable",
    weight="3")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-fortios/sdk/go/fortios/networking"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := networking.NewRouteStatic(ctx, "subnet", &networking.RouteStaticArgs{
			Blackhole: pulumi.String("disable"),
			Comment:   pulumi.String("Terraform test"),
			Device:    pulumi.String("port2"),
			Distance:  pulumi.String("22"),
			Dst:       pulumi.String("110.2.2.122/32"),
			Gateway:   pulumi.String("2.2.2.2"),
			Priority:  pulumi.String("3"),
			Status:    pulumi.String("enable"),
			Weight:    pulumi.String("3"),
		})
		if err != nil {
			return err
		}
		_, err = networking.NewRouteStatic(ctx, "internetService", &networking.RouteStaticArgs{
			Blackhole:       pulumi.String("disable"),
			Comment:         pulumi.String("Terraform Test"),
			Device:          pulumi.String("port2"),
			Distance:        pulumi.String("22"),
			Gateway:         pulumi.String("2.2.2.2"),
			InternetService: pulumi.Int(5242881),
			Priority:        pulumi.String("3"),
			Status:          pulumi.String("enable"),
			Weight:          pulumi.String("3"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fortios = Pulumiverse.Fortios;

return await Deployment.RunAsync(() => 
{
    var subnet = new Fortios.Networking.RouteStatic("subnet", new()
    {
        Blackhole = "disable",
        Comment = "Terraform test",
        Device = "port2",
        Distance = "22",
        Dst = "110.2.2.122/32",
        Gateway = "2.2.2.2",
        Priority = "3",
        Status = "enable",
        Weight = "3",
    });

    var internetService = new Fortios.Networking.RouteStatic("internetService", new()
    {
        Blackhole = "disable",
        Comment = "Terraform Test",
        Device = "port2",
        Distance = "22",
        Gateway = "2.2.2.2",
        InternetService = 5242881,
        Priority = "3",
        Status = "enable",
        Weight = "3",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fortios.networking.RouteStatic;
import com.pulumi.fortios.networking.RouteStaticArgs;
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 subnet = new RouteStatic("subnet", RouteStaticArgs.builder()
            .blackhole("disable")
            .comment("Terraform test")
            .device("port2")
            .distance("22")
            .dst("110.2.2.122/32")
            .gateway("2.2.2.2")
            .priority("3")
            .status("enable")
            .weight("3")
            .build());

        var internetService = new RouteStatic("internetService", RouteStaticArgs.builder()
            .blackhole("disable")
            .comment("Terraform Test")
            .device("port2")
            .distance("22")
            .gateway("2.2.2.2")
            .internetService(5242881)
            .priority("3")
            .status("enable")
            .weight("3")
            .build());

    }
}
Copy
resources:
  subnet:
    type: fortios:networking:RouteStatic
    properties:
      blackhole: disable
      comment: Terraform test
      device: port2
      distance: '22'
      dst: 110.2.2.122/32
      gateway: 2.2.2.2
      priority: '3'
      status: enable
      weight: '3'
  internetService:
    type: fortios:networking:RouteStatic
    properties:
      blackhole: disable
      comment: Terraform Test
      device: port2
      distance: '22'
      gateway: 2.2.2.2
      internetService: 5.242881e+06
      priority: '3'
      status: enable
      weight: '3'
Copy

Create RouteStatic Resource

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

Constructor syntax

new RouteStatic(name: string, args: RouteStaticArgs, opts?: CustomResourceOptions);
@overload
def RouteStatic(resource_name: str,
                args: RouteStaticArgs,
                opts: Optional[ResourceOptions] = None)

@overload
def RouteStatic(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                device: Optional[str] = None,
                gateway: Optional[str] = None,
                blackhole: Optional[str] = None,
                comment: Optional[str] = None,
                distance: Optional[str] = None,
                dst: Optional[str] = None,
                internet_service: Optional[int] = None,
                priority: Optional[str] = None,
                status: Optional[str] = None,
                weight: Optional[str] = None)
func NewRouteStatic(ctx *Context, name string, args RouteStaticArgs, opts ...ResourceOption) (*RouteStatic, error)
public RouteStatic(string name, RouteStaticArgs args, CustomResourceOptions? opts = null)
public RouteStatic(String name, RouteStaticArgs args)
public RouteStatic(String name, RouteStaticArgs args, CustomResourceOptions options)
type: fortios:networking:RouteStatic
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. RouteStaticArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. RouteStaticArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. RouteStaticArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. RouteStaticArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. RouteStaticArgs
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 routeStaticResource = new Fortios.Networking.RouteStatic("routeStaticResource", new()
{
    Device = "string",
    Gateway = "string",
    Blackhole = "string",
    Comment = "string",
    Distance = "string",
    Dst = "string",
    InternetService = 0,
    Priority = "string",
    Status = "string",
    Weight = "string",
});
Copy
example, err := networking.NewRouteStatic(ctx, "routeStaticResource", &networking.RouteStaticArgs{
	Device:          pulumi.String("string"),
	Gateway:         pulumi.String("string"),
	Blackhole:       pulumi.String("string"),
	Comment:         pulumi.String("string"),
	Distance:        pulumi.String("string"),
	Dst:             pulumi.String("string"),
	InternetService: pulumi.Int(0),
	Priority:        pulumi.String("string"),
	Status:          pulumi.String("string"),
	Weight:          pulumi.String("string"),
})
Copy
var routeStaticResource = new RouteStatic("routeStaticResource", RouteStaticArgs.builder()
    .device("string")
    .gateway("string")
    .blackhole("string")
    .comment("string")
    .distance("string")
    .dst("string")
    .internetService(0)
    .priority("string")
    .status("string")
    .weight("string")
    .build());
Copy
route_static_resource = fortios.networking.RouteStatic("routeStaticResource",
    device="string",
    gateway="string",
    blackhole="string",
    comment="string",
    distance="string",
    dst="string",
    internet_service=0,
    priority="string",
    status="string",
    weight="string")
Copy
const routeStaticResource = new fortios.networking.RouteStatic("routeStaticResource", {
    device: "string",
    gateway: "string",
    blackhole: "string",
    comment: "string",
    distance: "string",
    dst: "string",
    internetService: 0,
    priority: "string",
    status: "string",
    weight: "string",
});
Copy
type: fortios:networking:RouteStatic
properties:
    blackhole: string
    comment: string
    device: string
    distance: string
    dst: string
    gateway: string
    internetService: 0
    priority: string
    status: string
    weight: string
Copy

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

Device This property is required. string
Gateway out interface or tunnel.
Gateway This property is required. string
Gateway IP for this route.
Blackhole string
Enable/disable black hole.
Comment string
Optional comments.
Distance string
Administrative distance.
Dst string
Destination IP and mask for this route.
InternetService int
Application ID in the Internet service database.
Priority string
Administrative priority.
Status string
Enable/disable this static route. default is "enable".
Weight string
Administrative weight.
Device This property is required. string
Gateway out interface or tunnel.
Gateway This property is required. string
Gateway IP for this route.
Blackhole string
Enable/disable black hole.
Comment string
Optional comments.
Distance string
Administrative distance.
Dst string
Destination IP and mask for this route.
InternetService int
Application ID in the Internet service database.
Priority string
Administrative priority.
Status string
Enable/disable this static route. default is "enable".
Weight string
Administrative weight.
device This property is required. String
Gateway out interface or tunnel.
gateway This property is required. String
Gateway IP for this route.
blackhole String
Enable/disable black hole.
comment String
Optional comments.
distance String
Administrative distance.
dst String
Destination IP and mask for this route.
internetService Integer
Application ID in the Internet service database.
priority String
Administrative priority.
status String
Enable/disable this static route. default is "enable".
weight String
Administrative weight.
device This property is required. string
Gateway out interface or tunnel.
gateway This property is required. string
Gateway IP for this route.
blackhole string
Enable/disable black hole.
comment string
Optional comments.
distance string
Administrative distance.
dst string
Destination IP and mask for this route.
internetService number
Application ID in the Internet service database.
priority string
Administrative priority.
status string
Enable/disable this static route. default is "enable".
weight string
Administrative weight.
device This property is required. str
Gateway out interface or tunnel.
gateway This property is required. str
Gateway IP for this route.
blackhole str
Enable/disable black hole.
comment str
Optional comments.
distance str
Administrative distance.
dst str
Destination IP and mask for this route.
internet_service int
Application ID in the Internet service database.
priority str
Administrative priority.
status str
Enable/disable this static route. default is "enable".
weight str
Administrative weight.
device This property is required. String
Gateway out interface or tunnel.
gateway This property is required. String
Gateway IP for this route.
blackhole String
Enable/disable black hole.
comment String
Optional comments.
distance String
Administrative distance.
dst String
Destination IP and mask for this route.
internetService Number
Application ID in the Internet service database.
priority String
Administrative priority.
status String
Enable/disable this static route. default is "enable".
weight String
Administrative weight.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing RouteStatic Resource

Get an existing RouteStatic 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?: RouteStaticState, opts?: CustomResourceOptions): RouteStatic
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        blackhole: Optional[str] = None,
        comment: Optional[str] = None,
        device: Optional[str] = None,
        distance: Optional[str] = None,
        dst: Optional[str] = None,
        gateway: Optional[str] = None,
        internet_service: Optional[int] = None,
        priority: Optional[str] = None,
        status: Optional[str] = None,
        weight: Optional[str] = None) -> RouteStatic
func GetRouteStatic(ctx *Context, name string, id IDInput, state *RouteStaticState, opts ...ResourceOption) (*RouteStatic, error)
public static RouteStatic Get(string name, Input<string> id, RouteStaticState? state, CustomResourceOptions? opts = null)
public static RouteStatic get(String name, Output<String> id, RouteStaticState state, CustomResourceOptions options)
resources:  _:    type: fortios:networking:RouteStatic    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Blackhole string
Enable/disable black hole.
Comment string
Optional comments.
Device string
Gateway out interface or tunnel.
Distance string
Administrative distance.
Dst string
Destination IP and mask for this route.
Gateway string
Gateway IP for this route.
InternetService int
Application ID in the Internet service database.
Priority string
Administrative priority.
Status string
Enable/disable this static route. default is "enable".
Weight string
Administrative weight.
Blackhole string
Enable/disable black hole.
Comment string
Optional comments.
Device string
Gateway out interface or tunnel.
Distance string
Administrative distance.
Dst string
Destination IP and mask for this route.
Gateway string
Gateway IP for this route.
InternetService int
Application ID in the Internet service database.
Priority string
Administrative priority.
Status string
Enable/disable this static route. default is "enable".
Weight string
Administrative weight.
blackhole String
Enable/disable black hole.
comment String
Optional comments.
device String
Gateway out interface or tunnel.
distance String
Administrative distance.
dst String
Destination IP and mask for this route.
gateway String
Gateway IP for this route.
internetService Integer
Application ID in the Internet service database.
priority String
Administrative priority.
status String
Enable/disable this static route. default is "enable".
weight String
Administrative weight.
blackhole string
Enable/disable black hole.
comment string
Optional comments.
device string
Gateway out interface or tunnel.
distance string
Administrative distance.
dst string
Destination IP and mask for this route.
gateway string
Gateway IP for this route.
internetService number
Application ID in the Internet service database.
priority string
Administrative priority.
status string
Enable/disable this static route. default is "enable".
weight string
Administrative weight.
blackhole str
Enable/disable black hole.
comment str
Optional comments.
device str
Gateway out interface or tunnel.
distance str
Administrative distance.
dst str
Destination IP and mask for this route.
gateway str
Gateway IP for this route.
internet_service int
Application ID in the Internet service database.
priority str
Administrative priority.
status str
Enable/disable this static route. default is "enable".
weight str
Administrative weight.
blackhole String
Enable/disable black hole.
comment String
Optional comments.
device String
Gateway out interface or tunnel.
distance String
Administrative distance.
dst String
Destination IP and mask for this route.
gateway String
Gateway IP for this route.
internetService Number
Application ID in the Internet service database.
priority String
Administrative priority.
status String
Enable/disable this static route. default is "enable".
weight String
Administrative weight.

Package Details

Repository
fortios pulumiverse/pulumi-fortios
License
Apache-2.0
Notes
This Pulumi package is based on the fortios Terraform Provider.