1. Packages
  2. Opennebula Provider
  3. API Docs
  4. VirtualRouterNic
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula

opennebula.VirtualRouterNic

Explore with Pulumi AI

opennebula logo
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula

    Provides an OpenNebula virtual router resource.

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    resources:
      exampleVirtualRouterInstanceTemplate:
        type: opennebula:VirtualRouterInstanceTemplate
        properties:
          permissions: '642'
          group: oneadmin
          cpu: '0.5'
          vcpu: '1'
          memory: '512'
          context:
            dns_hostname: yes
            network: YES
          graphics:
            keymap: en-us
            listen: 0.0.0.0
            type: VNC
          os:
            arch: x86_64
            boot: ""
          tags:
            env: prod
      exampleVirtualRouter:
        type: opennebula:VirtualRouter
        properties:
          permissions: '642'
          group: oneadmin
          description: This is an example of virtual router
          instanceTemplateId: ${exampleVirtualRouterInstanceTemplate.virtualRouterInstanceTemplateId}
          lock: USE
          tags:
            environment: example
      exampleVirtualRouterInstance:
        type: opennebula:VirtualRouterInstance
        properties:
          group: oneadmin
          permissions: '642'
          memory: 128
          cpu: 0.1
          virtualRouterId: ${exampleVirtualRouter.virtualRouterId}
          tags:
            environment: example
      exampleVirtualNetwork:
        type: opennebula:VirtualNetwork
        properties:
          type: bridge
          bridge: onebr
          mtu: 1500
          ars:
            - arType: IP4
              size: 12
              ip4: 172.16.100.130
          permissions: '642'
          group: oneadmin
          securityGroups:
            - 0
          clusters:
            - 0
      example1:
        type: opennebula:VirtualRouterNic
        properties:
          floatingIp: true
          floatingOnly: true
          virtualRouterId: ${exampleVirtualRouter.virtualRouterId}
          networkId: ${exampleVirtualNetwork.virtualNetworkId}
      example2:
        type: opennebula:VirtualRouterNic
        properties:
          virtualRouterId: ${exampleVirtualRouter.virtualRouterId}
          networkId: ${exampleVirtualNetwork.virtualNetworkId}
    

    Create VirtualRouterNic Resource

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

    Constructor syntax

    new VirtualRouterNic(name: string, args: VirtualRouterNicArgs, opts?: CustomResourceOptions);
    @overload
    def VirtualRouterNic(resource_name: str,
                         args: VirtualRouterNicArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def VirtualRouterNic(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         network_id: Optional[float] = None,
                         virtual_router_id: Optional[float] = None,
                         floating_ip: Optional[bool] = None,
                         floating_only: Optional[bool] = None,
                         model: Optional[str] = None,
                         physical_device: Optional[str] = None,
                         security_groups: Optional[Sequence[float]] = None,
                         timeouts: Optional[VirtualRouterNicTimeoutsArgs] = None,
                         virtio_queues: Optional[str] = None,
                         virtual_router_nic_id: Optional[str] = None)
    func NewVirtualRouterNic(ctx *Context, name string, args VirtualRouterNicArgs, opts ...ResourceOption) (*VirtualRouterNic, error)
    public VirtualRouterNic(string name, VirtualRouterNicArgs args, CustomResourceOptions? opts = null)
    public VirtualRouterNic(String name, VirtualRouterNicArgs args)
    public VirtualRouterNic(String name, VirtualRouterNicArgs args, CustomResourceOptions options)
    
    type: opennebula:VirtualRouterNic
    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 VirtualRouterNicArgs
    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 VirtualRouterNicArgs
    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 VirtualRouterNicArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VirtualRouterNicArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VirtualRouterNicArgs
    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 virtualRouterNicResource = new Opennebula.VirtualRouterNic("virtualRouterNicResource", new()
    {
        NetworkId = 0,
        VirtualRouterId = 0,
        FloatingIp = false,
        FloatingOnly = false,
        Model = "string",
        PhysicalDevice = "string",
        SecurityGroups = new[]
        {
            0,
        },
        Timeouts = new Opennebula.Inputs.VirtualRouterNicTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
        VirtioQueues = "string",
        VirtualRouterNicId = "string",
    });
    
    example, err := opennebula.NewVirtualRouterNic(ctx, "virtualRouterNicResource", &opennebula.VirtualRouterNicArgs{
    NetworkId: pulumi.Float64(0),
    VirtualRouterId: pulumi.Float64(0),
    FloatingIp: pulumi.Bool(false),
    FloatingOnly: pulumi.Bool(false),
    Model: pulumi.String("string"),
    PhysicalDevice: pulumi.String("string"),
    SecurityGroups: pulumi.Float64Array{
    pulumi.Float64(0),
    },
    Timeouts: &.VirtualRouterNicTimeoutsArgs{
    Create: pulumi.String("string"),
    Delete: pulumi.String("string"),
    },
    VirtioQueues: pulumi.String("string"),
    VirtualRouterNicId: pulumi.String("string"),
    })
    
    var virtualRouterNicResource = new VirtualRouterNic("virtualRouterNicResource", VirtualRouterNicArgs.builder()
        .networkId(0)
        .virtualRouterId(0)
        .floatingIp(false)
        .floatingOnly(false)
        .model("string")
        .physicalDevice("string")
        .securityGroups(0)
        .timeouts(VirtualRouterNicTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .virtioQueues("string")
        .virtualRouterNicId("string")
        .build());
    
    virtual_router_nic_resource = opennebula.VirtualRouterNic("virtualRouterNicResource",
        network_id=0,
        virtual_router_id=0,
        floating_ip=False,
        floating_only=False,
        model="string",
        physical_device="string",
        security_groups=[0],
        timeouts={
            "create": "string",
            "delete": "string",
        },
        virtio_queues="string",
        virtual_router_nic_id="string")
    
    const virtualRouterNicResource = new opennebula.VirtualRouterNic("virtualRouterNicResource", {
        networkId: 0,
        virtualRouterId: 0,
        floatingIp: false,
        floatingOnly: false,
        model: "string",
        physicalDevice: "string",
        securityGroups: [0],
        timeouts: {
            create: "string",
            "delete": "string",
        },
        virtioQueues: "string",
        virtualRouterNicId: "string",
    });
    
    type: opennebula:VirtualRouterNic
    properties:
        floatingIp: false
        floatingOnly: false
        model: string
        networkId: 0
        physicalDevice: string
        securityGroups:
            - 0
        timeouts:
            create: string
            delete: string
        virtioQueues: string
        virtualRouterId: 0
        virtualRouterNicId: string
    

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

    NetworkId double
    ID of the virtual network to attach.
    VirtualRouterId double
    The ID of the parent virtual router resource.
    FloatingIp bool
    Allocate floating IP for the NIC. Defaults to false.
    FloatingOnly bool
    Do not allocate IP for the NIC. Defaults to false.
    Model string
    Nic model driver. Example: virtio.
    PhysicalDevice string
    Physical device hosting the virtual network.
    SecurityGroups List<double>
    List of security group IDs to use on the virtual network.
    Timeouts VirtualRouterNicTimeouts
    VirtioQueues string
    Virtio multi-queue size. Only if model is virtio.
    VirtualRouterNicId string
    NetworkId float64
    ID of the virtual network to attach.
    VirtualRouterId float64
    The ID of the parent virtual router resource.
    FloatingIp bool
    Allocate floating IP for the NIC. Defaults to false.
    FloatingOnly bool
    Do not allocate IP for the NIC. Defaults to false.
    Model string
    Nic model driver. Example: virtio.
    PhysicalDevice string
    Physical device hosting the virtual network.
    SecurityGroups []float64
    List of security group IDs to use on the virtual network.
    Timeouts VirtualRouterNicTimeoutsArgs
    VirtioQueues string
    Virtio multi-queue size. Only if model is virtio.
    VirtualRouterNicId string
    networkId Double
    ID of the virtual network to attach.
    virtualRouterId Double
    The ID of the parent virtual router resource.
    floatingIp Boolean
    Allocate floating IP for the NIC. Defaults to false.
    floatingOnly Boolean
    Do not allocate IP for the NIC. Defaults to false.
    model String
    Nic model driver. Example: virtio.
    physicalDevice String
    Physical device hosting the virtual network.
    securityGroups List<Double>
    List of security group IDs to use on the virtual network.
    timeouts VirtualRouterNicTimeouts
    virtioQueues String
    Virtio multi-queue size. Only if model is virtio.
    virtualRouterNicId String
    networkId number
    ID of the virtual network to attach.
    virtualRouterId number
    The ID of the parent virtual router resource.
    floatingIp boolean
    Allocate floating IP for the NIC. Defaults to false.
    floatingOnly boolean
    Do not allocate IP for the NIC. Defaults to false.
    model string
    Nic model driver. Example: virtio.
    physicalDevice string
    Physical device hosting the virtual network.
    securityGroups number[]
    List of security group IDs to use on the virtual network.
    timeouts VirtualRouterNicTimeouts
    virtioQueues string
    Virtio multi-queue size. Only if model is virtio.
    virtualRouterNicId string
    network_id float
    ID of the virtual network to attach.
    virtual_router_id float
    The ID of the parent virtual router resource.
    floating_ip bool
    Allocate floating IP for the NIC. Defaults to false.
    floating_only bool
    Do not allocate IP for the NIC. Defaults to false.
    model str
    Nic model driver. Example: virtio.
    physical_device str
    Physical device hosting the virtual network.
    security_groups Sequence[float]
    List of security group IDs to use on the virtual network.
    timeouts VirtualRouterNicTimeoutsArgs
    virtio_queues str
    Virtio multi-queue size. Only if model is virtio.
    virtual_router_nic_id str
    networkId Number
    ID of the virtual network to attach.
    virtualRouterId Number
    The ID of the parent virtual router resource.
    floatingIp Boolean
    Allocate floating IP for the NIC. Defaults to false.
    floatingOnly Boolean
    Do not allocate IP for the NIC. Defaults to false.
    model String
    Nic model driver. Example: virtio.
    physicalDevice String
    Physical device hosting the virtual network.
    securityGroups List<Number>
    List of security group IDs to use on the virtual network.
    timeouts Property Map
    virtioQueues String
    Virtio multi-queue size. Only if model is virtio.
    virtualRouterNicId String

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Network string
    Name of the virtual network to attach.
    Id string
    The provider-assigned unique ID for this managed resource.
    Network string
    Name of the virtual network to attach.
    id String
    The provider-assigned unique ID for this managed resource.
    network String
    Name of the virtual network to attach.
    id string
    The provider-assigned unique ID for this managed resource.
    network string
    Name of the virtual network to attach.
    id str
    The provider-assigned unique ID for this managed resource.
    network str
    Name of the virtual network to attach.
    id String
    The provider-assigned unique ID for this managed resource.
    network String
    Name of the virtual network to attach.

    Look up Existing VirtualRouterNic Resource

    Get an existing VirtualRouterNic 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?: VirtualRouterNicState, opts?: CustomResourceOptions): VirtualRouterNic
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            floating_ip: Optional[bool] = None,
            floating_only: Optional[bool] = None,
            model: Optional[str] = None,
            network: Optional[str] = None,
            network_id: Optional[float] = None,
            physical_device: Optional[str] = None,
            security_groups: Optional[Sequence[float]] = None,
            timeouts: Optional[VirtualRouterNicTimeoutsArgs] = None,
            virtio_queues: Optional[str] = None,
            virtual_router_id: Optional[float] = None,
            virtual_router_nic_id: Optional[str] = None) -> VirtualRouterNic
    func GetVirtualRouterNic(ctx *Context, name string, id IDInput, state *VirtualRouterNicState, opts ...ResourceOption) (*VirtualRouterNic, error)
    public static VirtualRouterNic Get(string name, Input<string> id, VirtualRouterNicState? state, CustomResourceOptions? opts = null)
    public static VirtualRouterNic get(String name, Output<String> id, VirtualRouterNicState state, CustomResourceOptions options)
    resources:  _:    type: opennebula:VirtualRouterNic    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:
    FloatingIp bool
    Allocate floating IP for the NIC. Defaults to false.
    FloatingOnly bool
    Do not allocate IP for the NIC. Defaults to false.
    Model string
    Nic model driver. Example: virtio.
    Network string
    Name of the virtual network to attach.
    NetworkId double
    ID of the virtual network to attach.
    PhysicalDevice string
    Physical device hosting the virtual network.
    SecurityGroups List<double>
    List of security group IDs to use on the virtual network.
    Timeouts VirtualRouterNicTimeouts
    VirtioQueues string
    Virtio multi-queue size. Only if model is virtio.
    VirtualRouterId double
    The ID of the parent virtual router resource.
    VirtualRouterNicId string
    FloatingIp bool
    Allocate floating IP for the NIC. Defaults to false.
    FloatingOnly bool
    Do not allocate IP for the NIC. Defaults to false.
    Model string
    Nic model driver. Example: virtio.
    Network string
    Name of the virtual network to attach.
    NetworkId float64
    ID of the virtual network to attach.
    PhysicalDevice string
    Physical device hosting the virtual network.
    SecurityGroups []float64
    List of security group IDs to use on the virtual network.
    Timeouts VirtualRouterNicTimeoutsArgs
    VirtioQueues string
    Virtio multi-queue size. Only if model is virtio.
    VirtualRouterId float64
    The ID of the parent virtual router resource.
    VirtualRouterNicId string
    floatingIp Boolean
    Allocate floating IP for the NIC. Defaults to false.
    floatingOnly Boolean
    Do not allocate IP for the NIC. Defaults to false.
    model String
    Nic model driver. Example: virtio.
    network String
    Name of the virtual network to attach.
    networkId Double
    ID of the virtual network to attach.
    physicalDevice String
    Physical device hosting the virtual network.
    securityGroups List<Double>
    List of security group IDs to use on the virtual network.
    timeouts VirtualRouterNicTimeouts
    virtioQueues String
    Virtio multi-queue size. Only if model is virtio.
    virtualRouterId Double
    The ID of the parent virtual router resource.
    virtualRouterNicId String
    floatingIp boolean
    Allocate floating IP for the NIC. Defaults to false.
    floatingOnly boolean
    Do not allocate IP for the NIC. Defaults to false.
    model string
    Nic model driver. Example: virtio.
    network string
    Name of the virtual network to attach.
    networkId number
    ID of the virtual network to attach.
    physicalDevice string
    Physical device hosting the virtual network.
    securityGroups number[]
    List of security group IDs to use on the virtual network.
    timeouts VirtualRouterNicTimeouts
    virtioQueues string
    Virtio multi-queue size. Only if model is virtio.
    virtualRouterId number
    The ID of the parent virtual router resource.
    virtualRouterNicId string
    floating_ip bool
    Allocate floating IP for the NIC. Defaults to false.
    floating_only bool
    Do not allocate IP for the NIC. Defaults to false.
    model str
    Nic model driver. Example: virtio.
    network str
    Name of the virtual network to attach.
    network_id float
    ID of the virtual network to attach.
    physical_device str
    Physical device hosting the virtual network.
    security_groups Sequence[float]
    List of security group IDs to use on the virtual network.
    timeouts VirtualRouterNicTimeoutsArgs
    virtio_queues str
    Virtio multi-queue size. Only if model is virtio.
    virtual_router_id float
    The ID of the parent virtual router resource.
    virtual_router_nic_id str
    floatingIp Boolean
    Allocate floating IP for the NIC. Defaults to false.
    floatingOnly Boolean
    Do not allocate IP for the NIC. Defaults to false.
    model String
    Nic model driver. Example: virtio.
    network String
    Name of the virtual network to attach.
    networkId Number
    ID of the virtual network to attach.
    physicalDevice String
    Physical device hosting the virtual network.
    securityGroups List<Number>
    List of security group IDs to use on the virtual network.
    timeouts Property Map
    virtioQueues String
    Virtio multi-queue size. Only if model is virtio.
    virtualRouterId Number
    The ID of the parent virtual router resource.
    virtualRouterNicId String

    Supporting Types

    VirtualRouterNicTimeouts, VirtualRouterNicTimeoutsArgs

    Create string
    Delete string
    Create string
    Delete string
    create String
    delete String
    create string
    delete string
    create str
    delete str
    create String
    delete String

    Import

    opennebula_virtual_router_nic can be imported using its ID:

    $ pulumi import opennebula:index/virtualRouterNic:VirtualRouterNic example 123
    

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

    Package Details

    Repository
    opennebula opennebula/terraform-provider-opennebula
    License
    Notes
    This Pulumi package is based on the opennebula Terraform Provider.
    opennebula logo
    opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula