1. Packages
  2. Routeros Provider
  3. API Docs
  4. InterfaceVeth
routeros 1.83.0 published on Wednesday, Apr 16, 2025 by terraform-routeros

routeros.InterfaceVeth

Explore with Pulumi AI

routeros logo
routeros 1.83.0 published on Wednesday, Apr 16, 2025 by terraform-routeros

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as routeros from "@pulumi/routeros";
    
    const test = new routeros.InterfaceVeth("test", {
        address: "192.168.120.2/24",
        comment: "Virtual interface",
        gateway: "192.168.120.1",
    });
    
    import pulumi
    import pulumi_routeros as routeros
    
    test = routeros.InterfaceVeth("test",
        address="192.168.120.2/24",
        comment="Virtual interface",
        gateway="192.168.120.1")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/routeros/routeros"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := routeros.NewInterfaceVeth(ctx, "test", &routeros.InterfaceVethArgs{
    			Address: pulumi.String("192.168.120.2/24"),
    			Comment: pulumi.String("Virtual interface"),
    			Gateway: pulumi.String("192.168.120.1"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Routeros = Pulumi.Routeros;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Routeros.InterfaceVeth("test", new()
        {
            Address = "192.168.120.2/24",
            Comment = "Virtual interface",
            Gateway = "192.168.120.1",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.routeros.InterfaceVeth;
    import com.pulumi.routeros.InterfaceVethArgs;
    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 test = new InterfaceVeth("test", InterfaceVethArgs.builder()
                .address("192.168.120.2/24")
                .comment("Virtual interface")
                .gateway("192.168.120.1")
                .build());
    
        }
    }
    
    resources:
      test:
        type: routeros:InterfaceVeth
        properties:
          address: 192.168.120.2/24
          comment: Virtual interface
          gateway: 192.168.120.1
    

    Create InterfaceVeth Resource

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

    Constructor syntax

    new InterfaceVeth(name: string, args?: InterfaceVethArgs, opts?: CustomResourceOptions);
    @overload
    def InterfaceVeth(resource_name: str,
                      args: Optional[InterfaceVethArgs] = None,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def InterfaceVeth(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      ___id_: Optional[float] = None,
                      ___path_: Optional[str] = None,
                      address: Optional[str] = None,
                      comment: Optional[str] = None,
                      disabled: Optional[bool] = None,
                      gateway: Optional[str] = None,
                      gateway6: Optional[str] = None,
                      interface_veth_id: Optional[str] = None,
                      name: Optional[str] = None)
    func NewInterfaceVeth(ctx *Context, name string, args *InterfaceVethArgs, opts ...ResourceOption) (*InterfaceVeth, error)
    public InterfaceVeth(string name, InterfaceVethArgs? args = null, CustomResourceOptions? opts = null)
    public InterfaceVeth(String name, InterfaceVethArgs args)
    public InterfaceVeth(String name, InterfaceVethArgs args, CustomResourceOptions options)
    
    type: routeros:InterfaceVeth
    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 InterfaceVethArgs
    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 InterfaceVethArgs
    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 InterfaceVethArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InterfaceVethArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InterfaceVethArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Address string
    IP address.
    Comment string
    Disabled bool
    Gateway string
    Gateway IP address.
    Gateway6 string
    Gateway IPv6 address.
    InterfaceVethId string
    The ID of this resource.
    Name string
    Interface name.
    ___id_ double
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    Address string
    IP address.
    Comment string
    Disabled bool
    Gateway string
    Gateway IP address.
    Gateway6 string
    Gateway IPv6 address.
    InterfaceVethId string
    The ID of this resource.
    Name string
    Interface name.
    ___id_ float64
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    ___id_ Double
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ String
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    address String
    IP address.
    comment String
    disabled Boolean
    gateway String
    Gateway IP address.
    gateway6 String
    Gateway IPv6 address.
    interfaceVethId String
    The ID of this resource.
    name String
    Interface name.
    ___id_ number
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    address string
    IP address.
    comment string
    disabled boolean
    gateway string
    Gateway IP address.
    gateway6 string
    Gateway IPv6 address.
    interfaceVethId string
    The ID of this resource.
    name string
    Interface name.
    ___id_ float
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ str
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    address str
    IP address.
    comment str
    disabled bool
    gateway str
    Gateway IP address.
    gateway6 str
    Gateway IPv6 address.
    interface_veth_id str
    The ID of this resource.
    name str
    Interface name.
    ___id_ Number
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ String
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    address String
    IP address.
    comment String
    disabled Boolean
    gateway String
    Gateway IP address.
    gateway6 String
    Gateway IPv6 address.
    interfaceVethId String
    The ID of this resource.
    name String
    Interface name.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Running bool
    Id string
    The provider-assigned unique ID for this managed resource.
    Running bool
    id String
    The provider-assigned unique ID for this managed resource.
    running Boolean
    id string
    The provider-assigned unique ID for this managed resource.
    running boolean
    id str
    The provider-assigned unique ID for this managed resource.
    running bool
    id String
    The provider-assigned unique ID for this managed resource.
    running Boolean

    Look up Existing InterfaceVeth Resource

    Get an existing InterfaceVeth 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?: InterfaceVethState, opts?: CustomResourceOptions): InterfaceVeth
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ___id_: Optional[float] = None,
            ___path_: Optional[str] = None,
            address: Optional[str] = None,
            comment: Optional[str] = None,
            disabled: Optional[bool] = None,
            gateway: Optional[str] = None,
            gateway6: Optional[str] = None,
            interface_veth_id: Optional[str] = None,
            name: Optional[str] = None,
            running: Optional[bool] = None) -> InterfaceVeth
    func GetInterfaceVeth(ctx *Context, name string, id IDInput, state *InterfaceVethState, opts ...ResourceOption) (*InterfaceVeth, error)
    public static InterfaceVeth Get(string name, Input<string> id, InterfaceVethState? state, CustomResourceOptions? opts = null)
    public static InterfaceVeth get(String name, Output<String> id, InterfaceVethState state, CustomResourceOptions options)
    resources:  _:    type: routeros:InterfaceVeth    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:
    Address string
    IP address.
    Comment string
    Disabled bool
    Gateway string
    Gateway IP address.
    Gateway6 string
    Gateway IPv6 address.
    InterfaceVethId string
    The ID of this resource.
    Name string
    Interface name.
    Running bool
    ___id_ double
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    Address string
    IP address.
    Comment string
    Disabled bool
    Gateway string
    Gateway IP address.
    Gateway6 string
    Gateway IPv6 address.
    InterfaceVethId string
    The ID of this resource.
    Name string
    Interface name.
    Running bool
    ___id_ float64
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    ___id_ Double
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ String
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    address String
    IP address.
    comment String
    disabled Boolean
    gateway String
    Gateway IP address.
    gateway6 String
    Gateway IPv6 address.
    interfaceVethId String
    The ID of this resource.
    name String
    Interface name.
    running Boolean
    ___id_ number
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    address string
    IP address.
    comment string
    disabled boolean
    gateway string
    Gateway IP address.
    gateway6 string
    Gateway IPv6 address.
    interfaceVethId string
    The ID of this resource.
    name string
    Interface name.
    running boolean
    ___id_ float
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ str
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    address str
    IP address.
    comment str
    disabled bool
    gateway str
    Gateway IP address.
    gateway6 str
    Gateway IPv6 address.
    interface_veth_id str
    The ID of this resource.
    name str
    Interface name.
    running bool
    ___id_ Number
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ String
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    address String
    IP address.
    comment String
    disabled Boolean
    gateway String
    Gateway IP address.
    gateway6 String
    Gateway IPv6 address.
    interfaceVethId String
    The ID of this resource.
    name String
    Interface name.
    running Boolean

    Import

    #The ID can be found via API or the terminal

    #The command for the terminal is -> :put [/interface/veth get [print show-ids]]

    $ pulumi import routeros:index/interfaceVeth:InterfaceVeth test "*0"
    

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

    Package Details

    Repository
    routeros terraform-routeros/terraform-provider-routeros
    License
    Notes
    This Pulumi package is based on the routeros Terraform Provider.
    routeros logo
    routeros 1.83.0 published on Wednesday, Apr 16, 2025 by terraform-routeros