opennebula.VirtualRouterNic
Explore with Pulumi AI
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: &opennebula.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:
- Network
Id double - ID of the virtual network to attach.
- Virtual
Router doubleId - 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 string
- Nic model driver. Example:
virtio
. - Physical
Device string - Physical device hosting the virtual network.
- Security
Groups List<double> - List of security group IDs to use on the virtual network.
- Timeouts
Virtual
Router Nic Timeouts - Virtio
Queues string - Virtio multi-queue size. Only if
model
isvirtio
. - Virtual
Router stringNic Id
- Network
Id float64 - ID of the virtual network to attach.
- Virtual
Router float64Id - 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 string
- Nic model driver. Example:
virtio
. - Physical
Device string - Physical device hosting the virtual network.
- Security
Groups []float64 - List of security group IDs to use on the virtual network.
- Timeouts
Virtual
Router Nic Timeouts Args - Virtio
Queues string - Virtio multi-queue size. Only if
model
isvirtio
. - Virtual
Router stringNic Id
- network
Id Double - ID of the virtual network to attach.
- virtual
Router DoubleId - The ID of the parent virtual router resource.
- floating
Ip Boolean - Allocate floating IP for the NIC. Defaults to
false
. - floating
Only Boolean - Do not allocate IP for the NIC. Defaults to
false
. - model String
- Nic model driver. Example:
virtio
. - physical
Device String - Physical device hosting the virtual network.
- security
Groups List<Double> - List of security group IDs to use on the virtual network.
- timeouts
Virtual
Router Nic Timeouts - virtio
Queues String - Virtio multi-queue size. Only if
model
isvirtio
. - virtual
Router StringNic Id
- network
Id number - ID of the virtual network to attach.
- virtual
Router numberId - The ID of the parent virtual router resource.
- floating
Ip boolean - Allocate floating IP for the NIC. Defaults to
false
. - floating
Only boolean - Do not allocate IP for the NIC. Defaults to
false
. - model string
- Nic model driver. Example:
virtio
. - physical
Device string - Physical device hosting the virtual network.
- security
Groups number[] - List of security group IDs to use on the virtual network.
- timeouts
Virtual
Router Nic Timeouts - virtio
Queues string - Virtio multi-queue size. Only if
model
isvirtio
. - virtual
Router stringNic Id
- network_
id float - ID of the virtual network to attach.
- virtual_
router_ floatid - 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
Virtual
Router Nic Timeouts Args - virtio_
queues str - Virtio multi-queue size. Only if
model
isvirtio
. - virtual_
router_ strnic_ id
- network
Id Number - ID of the virtual network to attach.
- virtual
Router NumberId - The ID of the parent virtual router resource.
- floating
Ip Boolean - Allocate floating IP for the NIC. Defaults to
false
. - floating
Only Boolean - Do not allocate IP for the NIC. Defaults to
false
. - model String
- Nic model driver. Example:
virtio
. - physical
Device String - Physical device hosting the virtual network.
- security
Groups List<Number> - List of security group IDs to use on the virtual network.
- timeouts Property Map
- virtio
Queues String - Virtio multi-queue size. Only if
model
isvirtio
. - virtual
Router StringNic Id
Outputs
All input properties are implicitly available as output properties. Additionally, the VirtualRouterNic resource produces the following output properties:
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.
- 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 string
- Nic model driver. Example:
virtio
. - Network string
- Name of the virtual network to attach.
- Network
Id double - ID of the virtual network to attach.
- Physical
Device string - Physical device hosting the virtual network.
- Security
Groups List<double> - List of security group IDs to use on the virtual network.
- Timeouts
Virtual
Router Nic Timeouts - Virtio
Queues string - Virtio multi-queue size. Only if
model
isvirtio
. - Virtual
Router doubleId - The ID of the parent virtual router resource.
- Virtual
Router stringNic Id
- 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 string
- Nic model driver. Example:
virtio
. - Network string
- Name of the virtual network to attach.
- Network
Id float64 - ID of the virtual network to attach.
- Physical
Device string - Physical device hosting the virtual network.
- Security
Groups []float64 - List of security group IDs to use on the virtual network.
- Timeouts
Virtual
Router Nic Timeouts Args - Virtio
Queues string - Virtio multi-queue size. Only if
model
isvirtio
. - Virtual
Router float64Id - The ID of the parent virtual router resource.
- Virtual
Router stringNic Id
- floating
Ip Boolean - Allocate floating IP for the NIC. Defaults to
false
. - floating
Only 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.
- network
Id Double - ID of the virtual network to attach.
- physical
Device String - Physical device hosting the virtual network.
- security
Groups List<Double> - List of security group IDs to use on the virtual network.
- timeouts
Virtual
Router Nic Timeouts - virtio
Queues String - Virtio multi-queue size. Only if
model
isvirtio
. - virtual
Router DoubleId - The ID of the parent virtual router resource.
- virtual
Router StringNic Id
- floating
Ip boolean - Allocate floating IP for the NIC. Defaults to
false
. - floating
Only 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.
- network
Id number - ID of the virtual network to attach.
- physical
Device string - Physical device hosting the virtual network.
- security
Groups number[] - List of security group IDs to use on the virtual network.
- timeouts
Virtual
Router Nic Timeouts - virtio
Queues string - Virtio multi-queue size. Only if
model
isvirtio
. - virtual
Router numberId - The ID of the parent virtual router resource.
- virtual
Router stringNic Id
- 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
Virtual
Router Nic Timeouts Args - virtio_
queues str - Virtio multi-queue size. Only if
model
isvirtio
. - virtual_
router_ floatid - The ID of the parent virtual router resource.
- virtual_
router_ strnic_ id
- floating
Ip Boolean - Allocate floating IP for the NIC. Defaults to
false
. - floating
Only 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.
- network
Id Number - ID of the virtual network to attach.
- physical
Device String - Physical device hosting the virtual network.
- security
Groups List<Number> - List of security group IDs to use on the virtual network.
- timeouts Property Map
- virtio
Queues String - Virtio multi-queue size. Only if
model
isvirtio
. - virtual
Router NumberId - The ID of the parent virtual router resource.
- virtual
Router StringNic Id
Supporting Types
VirtualRouterNicTimeouts, VirtualRouterNicTimeoutsArgs
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.