1. Registry
  2. Packages
  3. OVH
  4. API Docs
  5. DedicatedServerVirtualMac
Viewing docs for OVHCloud v2.21.0
published on Friday, Sep 25, 2026 by OVHcloud
ovh logo
Viewing docs for OVHCloud v2.21.0
published on Friday, Sep 25, 2026 by OVHcloud

    Attaches a virtual MAC address to an additional IP of a dedicated server.

    A virtual MAC lets an additional IP be used behind its own network interface (for example a bridged virtual machine or a dedicated host interface): OVHcloud routes the IP only when traffic originates from the associated MAC. The MAC address itself is generated by OVHcloud and exposed as mac_address.

    NOTE The virtual MAC is created together with its first IP. Destroying this resource removes the IP from the virtual MAC; OVHcloud releases the virtual MAC once its last IP is detached.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const vmac = new ovh.DedicatedServerVirtualMac("vmac", {
        serviceName: "nsxxxxxxx.ip-xx-xx-xx.eu",
        ipAddress: "1.2.3.4",
        type: "ovh",
        virtualMachineName: "my-vm",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    vmac = ovh.DedicatedServerVirtualMac("vmac",
        service_name="nsxxxxxxx.ip-xx-xx-xx.eu",
        ip_address="1.2.3.4",
        type="ovh",
        virtual_machine_name="my-vm")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ovh.NewDedicatedServerVirtualMac(ctx, "vmac", &ovh.DedicatedServerVirtualMacArgs{
    			ServiceName:        pulumi.String("nsxxxxxxx.ip-xx-xx-xx.eu"),
    			IpAddress:          pulumi.String("1.2.3.4"),
    			Type:               pulumi.String("ovh"),
    			VirtualMachineName: pulumi.String("my-vm"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var vmac = new Ovh.DedicatedServerVirtualMac("vmac", new()
        {
            ServiceName = "nsxxxxxxx.ip-xx-xx-xx.eu",
            IpAddress = "1.2.3.4",
            Type = "ovh",
            VirtualMachineName = "my-vm",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.ovhcloud.pulumi.ovh.DedicatedServerVirtualMac;
    import com.ovhcloud.pulumi.ovh.DedicatedServerVirtualMacArgs;
    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 vmac = new DedicatedServerVirtualMac("vmac", DedicatedServerVirtualMacArgs.builder()
                .serviceName("nsxxxxxxx.ip-xx-xx-xx.eu")
                .ipAddress("1.2.3.4")
                .type("ovh")
                .virtualMachineName("my-vm")
                .build());
    
        }
    }
    
    resources:
      vmac:
        type: ovh:DedicatedServerVirtualMac
        properties:
          serviceName: nsxxxxxxx.ip-xx-xx-xx.eu
          ipAddress: 1.2.3.4
          type: ovh
          virtualMachineName: my-vm
    
    Example coming soon!
    

    Create DedicatedServerVirtualMac Resource

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

    Constructor syntax

    new DedicatedServerVirtualMac(name: string, args: DedicatedServerVirtualMacArgs, opts?: CustomResourceOptions);
    @overload
    def DedicatedServerVirtualMac(resource_name: str,
                                  args: DedicatedServerVirtualMacArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def DedicatedServerVirtualMac(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  ip_address: Optional[str] = None,
                                  service_name: Optional[str] = None,
                                  virtual_machine_name: Optional[str] = None,
                                  type: Optional[str] = None)
    func NewDedicatedServerVirtualMac(ctx *Context, name string, args DedicatedServerVirtualMacArgs, opts ...ResourceOption) (*DedicatedServerVirtualMac, error)
    public DedicatedServerVirtualMac(string name, DedicatedServerVirtualMacArgs args, CustomResourceOptions? opts = null)
    public DedicatedServerVirtualMac(String name, DedicatedServerVirtualMacArgs args)
    public DedicatedServerVirtualMac(String name, DedicatedServerVirtualMacArgs args, CustomResourceOptions options)
    
    type: ovh:DedicatedServerVirtualMac
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "ovh_dedicated_server_virtual_mac" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args DedicatedServerVirtualMacArgs
    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 DedicatedServerVirtualMacArgs
    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 DedicatedServerVirtualMacArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DedicatedServerVirtualMacArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DedicatedServerVirtualMacArgs
    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 dedicatedServerVirtualMacResource = new Ovh.DedicatedServerVirtualMac("dedicatedServerVirtualMacResource", new()
    {
        IpAddress = "string",
        ServiceName = "string",
        VirtualMachineName = "string",
        Type = "string",
    });
    
    example, err := ovh.NewDedicatedServerVirtualMac(ctx, "dedicatedServerVirtualMacResource", &ovh.DedicatedServerVirtualMacArgs{
    	IpAddress:          pulumi.String("string"),
    	ServiceName:        pulumi.String("string"),
    	VirtualMachineName: pulumi.String("string"),
    	Type:               pulumi.String("string"),
    })
    
    resource "ovh_dedicated_server_virtual_mac" "dedicatedServerVirtualMacResource" {
      lifecycle {
        create_before_destroy = true
      }
      ip_address           = "string"
      service_name         = "string"
      virtual_machine_name = "string"
      type                 = "string"
    }
    
    var dedicatedServerVirtualMacResource = new DedicatedServerVirtualMac("dedicatedServerVirtualMacResource", DedicatedServerVirtualMacArgs.builder()
        .ipAddress("string")
        .serviceName("string")
        .virtualMachineName("string")
        .type("string")
        .build());
    
    dedicated_server_virtual_mac_resource = ovh.DedicatedServerVirtualMac("dedicatedServerVirtualMacResource",
        ip_address="string",
        service_name="string",
        virtual_machine_name="string",
        type="string")
    
    const dedicatedServerVirtualMacResource = new ovh.DedicatedServerVirtualMac("dedicatedServerVirtualMacResource", {
        ipAddress: "string",
        serviceName: "string",
        virtualMachineName: "string",
        type: "string",
    });
    
    type: ovh:DedicatedServerVirtualMac
    properties:
        ipAddress: string
        serviceName: string
        type: string
        virtualMachineName: string
    

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

    IpAddress string
    The additional IP address to attach to the virtual MAC.
    ServiceName string
    The internal name of your dedicated server.
    VirtualMachineName string
    A human-readable name to identify the IP/MAC pair.
    Type string
    The type of the virtual MAC address, ovh (default) or vmware.
    IpAddress string
    The additional IP address to attach to the virtual MAC.
    ServiceName string
    The internal name of your dedicated server.
    VirtualMachineName string
    A human-readable name to identify the IP/MAC pair.
    Type string
    The type of the virtual MAC address, ovh (default) or vmware.
    ip_address string
    The additional IP address to attach to the virtual MAC.
    service_name string
    The internal name of your dedicated server.
    virtual_machine_name string
    A human-readable name to identify the IP/MAC pair.
    type string
    The type of the virtual MAC address, ovh (default) or vmware.
    ipAddress String
    The additional IP address to attach to the virtual MAC.
    serviceName String
    The internal name of your dedicated server.
    virtualMachineName String
    A human-readable name to identify the IP/MAC pair.
    type String
    The type of the virtual MAC address, ovh (default) or vmware.
    ipAddress string
    The additional IP address to attach to the virtual MAC.
    serviceName string
    The internal name of your dedicated server.
    virtualMachineName string
    A human-readable name to identify the IP/MAC pair.
    type string
    The type of the virtual MAC address, ovh (default) or vmware.
    ip_address str
    The additional IP address to attach to the virtual MAC.
    service_name str
    The internal name of your dedicated server.
    virtual_machine_name str
    A human-readable name to identify the IP/MAC pair.
    type str
    The type of the virtual MAC address, ovh (default) or vmware.
    ipAddress String
    The additional IP address to attach to the virtual MAC.
    serviceName String
    The internal name of your dedicated server.
    virtualMachineName String
    A human-readable name to identify the IP/MAC pair.
    type String
    The type of the virtual MAC address, ovh (default) or vmware.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    MacAddress string
    The virtual MAC address generated by OVHcloud.
    Id string
    The provider-assigned unique ID for this managed resource.
    MacAddress string
    The virtual MAC address generated by OVHcloud.
    id string
    The provider-assigned unique ID for this managed resource.
    mac_address string
    The virtual MAC address generated by OVHcloud.
    id String
    The provider-assigned unique ID for this managed resource.
    macAddress String
    The virtual MAC address generated by OVHcloud.
    id string
    The provider-assigned unique ID for this managed resource.
    macAddress string
    The virtual MAC address generated by OVHcloud.
    id str
    The provider-assigned unique ID for this managed resource.
    mac_address str
    The virtual MAC address generated by OVHcloud.
    id String
    The provider-assigned unique ID for this managed resource.
    macAddress String
    The virtual MAC address generated by OVHcloud.

    Look up Existing DedicatedServerVirtualMac Resource

    Get an existing DedicatedServerVirtualMac 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?: DedicatedServerVirtualMacState, opts?: CustomResourceOptions): DedicatedServerVirtualMac
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ip_address: Optional[str] = None,
            mac_address: Optional[str] = None,
            service_name: Optional[str] = None,
            type: Optional[str] = None,
            virtual_machine_name: Optional[str] = None) -> DedicatedServerVirtualMac
    func GetDedicatedServerVirtualMac(ctx *Context, name string, id IDInput, state *DedicatedServerVirtualMacState, opts ...ResourceOption) (*DedicatedServerVirtualMac, error)
    public static DedicatedServerVirtualMac Get(string name, Input<string> id, DedicatedServerVirtualMacState? state, CustomResourceOptions? opts = null)
    public static DedicatedServerVirtualMac get(String name, Output<String> id, DedicatedServerVirtualMacState state, CustomResourceOptions options)
    resources:  _:    type: ovh:DedicatedServerVirtualMac    get:      id: ${id}
    import {
      to = ovh_dedicated_server_virtual_mac.example
      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:
    IpAddress string
    The additional IP address to attach to the virtual MAC.
    MacAddress string
    The virtual MAC address generated by OVHcloud.
    ServiceName string
    The internal name of your dedicated server.
    Type string
    The type of the virtual MAC address, ovh (default) or vmware.
    VirtualMachineName string
    A human-readable name to identify the IP/MAC pair.
    IpAddress string
    The additional IP address to attach to the virtual MAC.
    MacAddress string
    The virtual MAC address generated by OVHcloud.
    ServiceName string
    The internal name of your dedicated server.
    Type string
    The type of the virtual MAC address, ovh (default) or vmware.
    VirtualMachineName string
    A human-readable name to identify the IP/MAC pair.
    ip_address string
    The additional IP address to attach to the virtual MAC.
    mac_address string
    The virtual MAC address generated by OVHcloud.
    service_name string
    The internal name of your dedicated server.
    type string
    The type of the virtual MAC address, ovh (default) or vmware.
    virtual_machine_name string
    A human-readable name to identify the IP/MAC pair.
    ipAddress String
    The additional IP address to attach to the virtual MAC.
    macAddress String
    The virtual MAC address generated by OVHcloud.
    serviceName String
    The internal name of your dedicated server.
    type String
    The type of the virtual MAC address, ovh (default) or vmware.
    virtualMachineName String
    A human-readable name to identify the IP/MAC pair.
    ipAddress string
    The additional IP address to attach to the virtual MAC.
    macAddress string
    The virtual MAC address generated by OVHcloud.
    serviceName string
    The internal name of your dedicated server.
    type string
    The type of the virtual MAC address, ovh (default) or vmware.
    virtualMachineName string
    A human-readable name to identify the IP/MAC pair.
    ip_address str
    The additional IP address to attach to the virtual MAC.
    mac_address str
    The virtual MAC address generated by OVHcloud.
    service_name str
    The internal name of your dedicated server.
    type str
    The type of the virtual MAC address, ovh (default) or vmware.
    virtual_machine_name str
    A human-readable name to identify the IP/MAC pair.
    ipAddress String
    The additional IP address to attach to the virtual MAC.
    macAddress String
    The virtual MAC address generated by OVHcloud.
    serviceName String
    The internal name of your dedicated server.
    type String
    The type of the virtual MAC address, ovh (default) or vmware.
    virtualMachineName String
    A human-readable name to identify the IP/MAC pair.

    Import

    A virtual MAC can be imported using the service_name, mac_address and ip_address, separated by “/” E.g.,

    bash

    $ pulumi import ovh:index/dedicatedServerVirtualMac:DedicatedServerVirtualMac vmac service_name/mac_address/ip_address
    

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

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    Viewing docs for OVHCloud v2.21.0
    published on Friday, Sep 25, 2026 by OVHcloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial