1. Packages
  2. OVH
  3. API Docs
  4. Vrack
  5. DedicatedServerInterface
OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud

ovh.Vrack.DedicatedServerInterface

Explore with Pulumi AI

ovh logo
OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud

    Attach a Dedicated Server Network Interface to a vRack.

    NOTE: The resource ovh.Vrack.DedicatedServerInterface is intended to be used for dedicated servers that have configurable network interfaces.
    Legacy Dedicated servers that do not have configurable network interfaces MUST use the resource ovh.Vrack.DedicatedServer instead.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    import * as ovh from "@pulumi/ovh";
    
    const server = ovh.getServer({
        serviceName: "nsxxxxxxx.ip-xx-xx-xx.eu",
    });
    const vdsi = new ovh.vrack.DedicatedServerInterface("vdsi", {
        serviceName: "pn-xxxxxxx",
        interfaceId: server.then(server => server.enabledVrackVnis?.[0]),
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    server = ovh.get_server(service_name="nsxxxxxxx.ip-xx-xx-xx.eu")
    vdsi = ovh.vrack.DedicatedServerInterface("vdsi",
        service_name="pn-xxxxxxx",
        interface_id=server.enabled_vrack_vnis[0])
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/go/ovh"
    	"github.com/ovh/pulumi-ovh/sdk/go/ovh/Vrack"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		server, err := ovh.GetServer(ctx, &ovh.GetServerArgs{
    			ServiceName: "nsxxxxxxx.ip-xx-xx-xx.eu",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = Vrack.NewDedicatedServerInterface(ctx, "vdsi", &Vrack.DedicatedServerInterfaceArgs{
    			ServiceName: pulumi.String("pn-xxxxxxx"),
    			InterfaceId: pulumi.String(server.EnabledVrackVnis[0]),
    		})
    		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 server = Ovh.GetServer.Invoke(new()
        {
            ServiceName = "nsxxxxxxx.ip-xx-xx-xx.eu",
        });
    
        var vdsi = new Ovh.Vrack.DedicatedServerInterface("vdsi", new()
        {
            ServiceName = "pn-xxxxxxx",
            InterfaceId = server.Apply(getServerResult => getServerResult.EnabledVrackVnis[0]),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.OvhFunctions;
    import com.pulumi.ovh.inputs.GetServerArgs;
    import com.pulumi.ovh.Vrack.DedicatedServerInterface;
    import com.pulumi.ovh.Vrack.DedicatedServerInterfaceArgs;
    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) {
            final var server = OvhFunctions.getServer(GetServerArgs.builder()
                .serviceName("nsxxxxxxx.ip-xx-xx-xx.eu")
                .build());
    
            var vdsi = new DedicatedServerInterface("vdsi", DedicatedServerInterfaceArgs.builder()
                .serviceName("pn-xxxxxxx")
                .interfaceId(server.applyValue(getServerResult -> getServerResult.enabledVrackVnis()[0]))
                .build());
    
        }
    }
    
    resources:
      vdsi:
        type: ovh:Vrack:DedicatedServerInterface
        properties:
          serviceName: pn-xxxxxxx
          #name of the vrack
          interfaceId: ${server.enabledVrackVnis[0]}
    variables:
      server:
        fn::invoke:
          Function: ovh:getServer
          Arguments:
            serviceName: nsxxxxxxx.ip-xx-xx-xx.eu
    

    Create DedicatedServerInterface Resource

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

    Constructor syntax

    new DedicatedServerInterface(name: string, args: DedicatedServerInterfaceArgs, opts?: CustomResourceOptions);
    @overload
    def DedicatedServerInterface(resource_name: str,
                                 args: DedicatedServerInterfaceArgs,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def DedicatedServerInterface(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 interface_id: Optional[str] = None,
                                 service_name: Optional[str] = None)
    func NewDedicatedServerInterface(ctx *Context, name string, args DedicatedServerInterfaceArgs, opts ...ResourceOption) (*DedicatedServerInterface, error)
    public DedicatedServerInterface(string name, DedicatedServerInterfaceArgs args, CustomResourceOptions? opts = null)
    public DedicatedServerInterface(String name, DedicatedServerInterfaceArgs args)
    public DedicatedServerInterface(String name, DedicatedServerInterfaceArgs args, CustomResourceOptions options)
    
    type: ovh:Vrack:DedicatedServerInterface
    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 DedicatedServerInterfaceArgs
    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 DedicatedServerInterfaceArgs
    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 DedicatedServerInterfaceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DedicatedServerInterfaceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DedicatedServerInterfaceArgs
    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 dedicatedServerInterfaceResource = new Ovh.Vrack.DedicatedServerInterface("dedicatedServerInterfaceResource", new()
    {
        InterfaceId = "string",
        ServiceName = "string",
    });
    
    example, err := Vrack.NewDedicatedServerInterface(ctx, "dedicatedServerInterfaceResource", &Vrack.DedicatedServerInterfaceArgs{
    	InterfaceId: pulumi.String("string"),
    	ServiceName: pulumi.String("string"),
    })
    
    var dedicatedServerInterfaceResource = new DedicatedServerInterface("dedicatedServerInterfaceResource", DedicatedServerInterfaceArgs.builder()
        .interfaceId("string")
        .serviceName("string")
        .build());
    
    dedicated_server_interface_resource = ovh.vrack.DedicatedServerInterface("dedicatedServerInterfaceResource",
        interface_id="string",
        service_name="string")
    
    const dedicatedServerInterfaceResource = new ovh.vrack.DedicatedServerInterface("dedicatedServerInterfaceResource", {
        interfaceId: "string",
        serviceName: "string",
    });
    
    type: ovh:Vrack:DedicatedServerInterface
    properties:
        interfaceId: string
        serviceName: string
    

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

    InterfaceId string
    The id of dedicated server network interface.
    ServiceName string
    The id of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.
    InterfaceId string
    The id of dedicated server network interface.
    ServiceName string
    The id of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.
    interfaceId String
    The id of dedicated server network interface.
    serviceName String
    The id of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.
    interfaceId string
    The id of dedicated server network interface.
    serviceName string
    The id of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.
    interface_id str
    The id of dedicated server network interface.
    service_name str
    The id of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.
    interfaceId String
    The id of dedicated server network interface.
    serviceName String
    The id of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.

    Outputs

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

    Get an existing DedicatedServerInterface 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?: DedicatedServerInterfaceState, opts?: CustomResourceOptions): DedicatedServerInterface
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            interface_id: Optional[str] = None,
            service_name: Optional[str] = None) -> DedicatedServerInterface
    func GetDedicatedServerInterface(ctx *Context, name string, id IDInput, state *DedicatedServerInterfaceState, opts ...ResourceOption) (*DedicatedServerInterface, error)
    public static DedicatedServerInterface Get(string name, Input<string> id, DedicatedServerInterfaceState? state, CustomResourceOptions? opts = null)
    public static DedicatedServerInterface get(String name, Output<String> id, DedicatedServerInterfaceState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    InterfaceId string
    The id of dedicated server network interface.
    ServiceName string
    The id of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.
    InterfaceId string
    The id of dedicated server network interface.
    ServiceName string
    The id of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.
    interfaceId String
    The id of dedicated server network interface.
    serviceName String
    The id of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.
    interfaceId string
    The id of dedicated server network interface.
    serviceName string
    The id of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.
    interface_id str
    The id of dedicated server network interface.
    service_name str
    The id of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.
    interfaceId String
    The id of dedicated server network interface.
    serviceName String
    The id of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud