1. Packages
  2. Openwrt Provider
  3. API Docs
  4. NetworkGlobals
openwrt 0.0.20 published on Friday, Mar 7, 2025 by joneshf

openwrt.NetworkGlobals

Explore with Pulumi AI

Contains interface-independent options affecting the network configuration in general.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as openwrt from "@pulumi/openwrt";

const _this = new openwrt.NetworkGlobals("this", {
    networkGlobalsId: "globals",
    packetSteering: false,
    ulaPrefix: "fd12:3456:789a::/48",
});
Copy
import pulumi
import pulumi_openwrt as openwrt

this = openwrt.NetworkGlobals("this",
    network_globals_id="globals",
    packet_steering=False,
    ula_prefix="fd12:3456:789a::/48")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/openwrt/openwrt"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := openwrt.NewNetworkGlobals(ctx, "this", &openwrt.NetworkGlobalsArgs{
			NetworkGlobalsId: pulumi.String("globals"),
			PacketSteering:   pulumi.Bool(false),
			UlaPrefix:        pulumi.String("fd12:3456:789a::/48"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Openwrt = Pulumi.Openwrt;

return await Deployment.RunAsync(() => 
{
    var @this = new Openwrt.NetworkGlobals("this", new()
    {
        NetworkGlobalsId = "globals",
        PacketSteering = false,
        UlaPrefix = "fd12:3456:789a::/48",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openwrt.NetworkGlobals;
import com.pulumi.openwrt.NetworkGlobalsArgs;
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 this_ = new NetworkGlobals("this", NetworkGlobalsArgs.builder()
            .networkGlobalsId("globals")
            .packetSteering(false)
            .ulaPrefix("fd12:3456:789a::/48")
            .build());

    }
}
Copy
resources:
  this:
    type: openwrt:NetworkGlobals
    properties:
      networkGlobalsId: globals
      packetSteering: false
      ulaPrefix: fd12:3456:789a::/48
Copy

Create NetworkGlobals Resource

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

Constructor syntax

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

@overload
def NetworkGlobals(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   network_globals_id: Optional[str] = None,
                   packet_steering: Optional[bool] = None,
                   ula_prefix: Optional[str] = None)
func NewNetworkGlobals(ctx *Context, name string, args NetworkGlobalsArgs, opts ...ResourceOption) (*NetworkGlobals, error)
public NetworkGlobals(string name, NetworkGlobalsArgs args, CustomResourceOptions? opts = null)
public NetworkGlobals(String name, NetworkGlobalsArgs args)
public NetworkGlobals(String name, NetworkGlobalsArgs args, CustomResourceOptions options)
type: openwrt:NetworkGlobals
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. NetworkGlobalsArgs
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. NetworkGlobalsArgs
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. NetworkGlobalsArgs
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. NetworkGlobalsArgs
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. NetworkGlobalsArgs
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 networkGlobalsResource = new Openwrt.NetworkGlobals("networkGlobalsResource", new()
{
    NetworkGlobalsId = "string",
    PacketSteering = false,
    UlaPrefix = "string",
});
Copy
example, err := openwrt.NewNetworkGlobals(ctx, "networkGlobalsResource", &openwrt.NetworkGlobalsArgs{
	NetworkGlobalsId: pulumi.String("string"),
	PacketSteering:   pulumi.Bool(false),
	UlaPrefix:        pulumi.String("string"),
})
Copy
var networkGlobalsResource = new NetworkGlobals("networkGlobalsResource", NetworkGlobalsArgs.builder()
    .networkGlobalsId("string")
    .packetSteering(false)
    .ulaPrefix("string")
    .build());
Copy
network_globals_resource = openwrt.NetworkGlobals("networkGlobalsResource",
    network_globals_id="string",
    packet_steering=False,
    ula_prefix="string")
Copy
const networkGlobalsResource = new openwrt.NetworkGlobals("networkGlobalsResource", {
    networkGlobalsId: "string",
    packetSteering: false,
    ulaPrefix: "string",
});
Copy
type: openwrt:NetworkGlobals
properties:
    networkGlobalsId: string
    packetSteering: false
    ulaPrefix: string
Copy

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

NetworkGlobalsId This property is required. string
Name of the section. This name is only used when interacting with UCI directly.
PacketSteering bool
Use every CPU to handle packet traffic.
UlaPrefix string
IPv6 ULA prefix for this device.
NetworkGlobalsId This property is required. string
Name of the section. This name is only used when interacting with UCI directly.
PacketSteering bool
Use every CPU to handle packet traffic.
UlaPrefix string
IPv6 ULA prefix for this device.
networkGlobalsId This property is required. String
Name of the section. This name is only used when interacting with UCI directly.
packetSteering Boolean
Use every CPU to handle packet traffic.
ulaPrefix String
IPv6 ULA prefix for this device.
networkGlobalsId This property is required. string
Name of the section. This name is only used when interacting with UCI directly.
packetSteering boolean
Use every CPU to handle packet traffic.
ulaPrefix string
IPv6 ULA prefix for this device.
network_globals_id This property is required. str
Name of the section. This name is only used when interacting with UCI directly.
packet_steering bool
Use every CPU to handle packet traffic.
ula_prefix str
IPv6 ULA prefix for this device.
networkGlobalsId This property is required. String
Name of the section. This name is only used when interacting with UCI directly.
packetSteering Boolean
Use every CPU to handle packet traffic.
ulaPrefix String
IPv6 ULA prefix for this device.

Outputs

All input properties are implicitly available as output properties. Additionally, the NetworkGlobals 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 NetworkGlobals Resource

Get an existing NetworkGlobals 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?: NetworkGlobalsState, opts?: CustomResourceOptions): NetworkGlobals
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        network_globals_id: Optional[str] = None,
        packet_steering: Optional[bool] = None,
        ula_prefix: Optional[str] = None) -> NetworkGlobals
func GetNetworkGlobals(ctx *Context, name string, id IDInput, state *NetworkGlobalsState, opts ...ResourceOption) (*NetworkGlobals, error)
public static NetworkGlobals Get(string name, Input<string> id, NetworkGlobalsState? state, CustomResourceOptions? opts = null)
public static NetworkGlobals get(String name, Output<String> id, NetworkGlobalsState state, CustomResourceOptions options)
resources:  _:    type: openwrt:NetworkGlobals    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:
NetworkGlobalsId string
Name of the section. This name is only used when interacting with UCI directly.
PacketSteering bool
Use every CPU to handle packet traffic.
UlaPrefix string
IPv6 ULA prefix for this device.
NetworkGlobalsId string
Name of the section. This name is only used when interacting with UCI directly.
PacketSteering bool
Use every CPU to handle packet traffic.
UlaPrefix string
IPv6 ULA prefix for this device.
networkGlobalsId String
Name of the section. This name is only used when interacting with UCI directly.
packetSteering Boolean
Use every CPU to handle packet traffic.
ulaPrefix String
IPv6 ULA prefix for this device.
networkGlobalsId string
Name of the section. This name is only used when interacting with UCI directly.
packetSteering boolean
Use every CPU to handle packet traffic.
ulaPrefix string
IPv6 ULA prefix for this device.
network_globals_id str
Name of the section. This name is only used when interacting with UCI directly.
packet_steering bool
Use every CPU to handle packet traffic.
ula_prefix str
IPv6 ULA prefix for this device.
networkGlobalsId String
Name of the section. This name is only used when interacting with UCI directly.
packetSteering Boolean
Use every CPU to handle packet traffic.
ulaPrefix String
IPv6 ULA prefix for this device.

Import

There should only be one network.globals config.

It seems to default to the UCI name of globals.

$ pulumi import openwrt:index/networkGlobals:NetworkGlobals this globals
Copy

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

Package Details

Repository
openwrt joneshf/terraform-provider-openwrt
License
Notes
This Pulumi package is based on the openwrt Terraform Provider.