1. Packages
  2. OVH
  3. API Docs
  4. Vrack
  5. DedicatedCloudDatacenter
OVHCloud v2.2.3 published on Friday, Jun 6, 2025 by OVHcloud

ovh.Vrack.DedicatedCloudDatacenter

Explore with Pulumi AI

ovh logo
OVHCloud v2.2.3 published on Friday, Jun 6, 2025 by OVHcloud

    Move a Dedicated Cloud Datacenter to a vrack.

    Example Usage

    WARNING You have to import the resource first as it cannot be created, see Import section below.

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const vrack_dedicatedCloudDatacenter = new ovh.vrack.DedicatedCloudDatacenter("vrack-dedicatedCloudDatacenter", {
        serviceName: "<vRack service name>",
        datacenter: "<Dedicated Cloud Datacenter service name>",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    vrack_dedicated_cloud_datacenter = ovh.vrack.DedicatedCloudDatacenter("vrack-dedicatedCloudDatacenter",
        service_name="<vRack service name>",
        datacenter="<Dedicated Cloud Datacenter service name>")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/vrack"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vrack.NewDedicatedCloudDatacenter(ctx, "vrack-dedicatedCloudDatacenter", &vrack.DedicatedCloudDatacenterArgs{
    			ServiceName: pulumi.String("<vRack service name>"),
    			Datacenter:  pulumi.String("<Dedicated Cloud Datacenter service name>"),
    		})
    		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 vrack_dedicatedCloudDatacenter = new Ovh.Vrack.DedicatedCloudDatacenter("vrack-dedicatedCloudDatacenter", new()
        {
            ServiceName = "<vRack service name>",
            Datacenter = "<Dedicated Cloud Datacenter service name>",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.ovhcloud.pulumi.ovh.Vrack.DedicatedCloudDatacenter;
    import com.ovhcloud.pulumi.ovh.Vrack.DedicatedCloudDatacenterArgs;
    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 vrack_dedicatedCloudDatacenter = new DedicatedCloudDatacenter("vrack-dedicatedCloudDatacenter", DedicatedCloudDatacenterArgs.builder()
                .serviceName("<vRack service name>")
                .datacenter("<Dedicated Cloud Datacenter service name>")
                .build());
    
        }
    }
    
    resources:
      vrack-dedicatedCloudDatacenter:
        type: ovh:Vrack:DedicatedCloudDatacenter
        properties:
          serviceName: <vRack service name>
          datacenter: <Dedicated Cloud Datacenter service name>
    

    Create DedicatedCloudDatacenter Resource

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

    Constructor syntax

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

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

    Datacenter string
    Your Dedicated Cloud Datacenter.
    ServiceName string
    The internal name of your vrack
    Datacenter string
    Your Dedicated Cloud Datacenter.
    ServiceName string
    The internal name of your vrack
    datacenter String
    Your Dedicated Cloud Datacenter.
    serviceName String
    The internal name of your vrack
    datacenter string
    Your Dedicated Cloud Datacenter.
    serviceName string
    The internal name of your vrack
    datacenter str
    Your Dedicated Cloud Datacenter.
    service_name str
    The internal name of your vrack
    datacenter String
    Your Dedicated Cloud Datacenter.
    serviceName String
    The internal name of your vrack

    Outputs

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

    DedicatedCloud string
    Your dedicatedCloud name
    Id string
    The provider-assigned unique ID for this managed resource.
    TargetServiceName string
    The internal name of your target vrack
    DedicatedCloud string
    Your dedicatedCloud name
    Id string
    The provider-assigned unique ID for this managed resource.
    TargetServiceName string
    The internal name of your target vrack
    dedicatedCloud String
    Your dedicatedCloud name
    id String
    The provider-assigned unique ID for this managed resource.
    targetServiceName String
    The internal name of your target vrack
    dedicatedCloud string
    Your dedicatedCloud name
    id string
    The provider-assigned unique ID for this managed resource.
    targetServiceName string
    The internal name of your target vrack
    dedicated_cloud str
    Your dedicatedCloud name
    id str
    The provider-assigned unique ID for this managed resource.
    target_service_name str
    The internal name of your target vrack
    dedicatedCloud String
    Your dedicatedCloud name
    id String
    The provider-assigned unique ID for this managed resource.
    targetServiceName String
    The internal name of your target vrack

    Look up Existing DedicatedCloudDatacenter Resource

    Get an existing DedicatedCloudDatacenter 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?: DedicatedCloudDatacenterState, opts?: CustomResourceOptions): DedicatedCloudDatacenter
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            datacenter: Optional[str] = None,
            dedicated_cloud: Optional[str] = None,
            service_name: Optional[str] = None,
            target_service_name: Optional[str] = None) -> DedicatedCloudDatacenter
    func GetDedicatedCloudDatacenter(ctx *Context, name string, id IDInput, state *DedicatedCloudDatacenterState, opts ...ResourceOption) (*DedicatedCloudDatacenter, error)
    public static DedicatedCloudDatacenter Get(string name, Input<string> id, DedicatedCloudDatacenterState? state, CustomResourceOptions? opts = null)
    public static DedicatedCloudDatacenter get(String name, Output<String> id, DedicatedCloudDatacenterState state, CustomResourceOptions options)
    resources:  _:    type: ovh:Vrack:DedicatedCloudDatacenter    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:
    Datacenter string
    Your Dedicated Cloud Datacenter.
    DedicatedCloud string
    Your dedicatedCloud name
    ServiceName string
    The internal name of your vrack
    TargetServiceName string
    The internal name of your target vrack
    Datacenter string
    Your Dedicated Cloud Datacenter.
    DedicatedCloud string
    Your dedicatedCloud name
    ServiceName string
    The internal name of your vrack
    TargetServiceName string
    The internal name of your target vrack
    datacenter String
    Your Dedicated Cloud Datacenter.
    dedicatedCloud String
    Your dedicatedCloud name
    serviceName String
    The internal name of your vrack
    targetServiceName String
    The internal name of your target vrack
    datacenter string
    Your Dedicated Cloud Datacenter.
    dedicatedCloud string
    Your dedicatedCloud name
    serviceName string
    The internal name of your vrack
    targetServiceName string
    The internal name of your target vrack
    datacenter str
    Your Dedicated Cloud Datacenter.
    dedicated_cloud str
    Your dedicatedCloud name
    service_name str
    The internal name of your vrack
    target_service_name str
    The internal name of your target vrack
    datacenter String
    Your Dedicated Cloud Datacenter.
    dedicatedCloud String
    Your dedicatedCloud name
    serviceName String
    The internal name of your vrack
    targetServiceName String
    The internal name of your target vrack

    Import

    A Datacenter will always be in a vRack, first import the resource, this will move the Dedicated Cloud Datacenter to the vRack target.

    bash

    $ pulumi import ovh:Vrack/dedicatedCloudDatacenter:DedicatedCloudDatacenter vrack-dedicatedCloudDatacenter "<vRack service name>/<Dedicated Cloud Datacener service name>/<vRack target service name>"
    

    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
    OVHCloud v2.2.3 published on Friday, Jun 6, 2025 by OVHcloud