1. Packages
  2. OVH
  3. API Docs
  4. Vrack
  5. CloudProject
OVHCloud v1.4.0 published on Monday, Jan 6, 2025 by OVHcloud

ovh.Vrack.CloudProject

Explore with Pulumi AI

Attach a Public Cloud Project to a VRack.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";

const vcp = new ovh.vrack.CloudProject("vcp", {
    projectId: "67890",
    serviceName: "12345",
});
Copy
import pulumi
import pulumi_ovh as ovh

vcp = ovh.vrack.CloudProject("vcp",
    project_id="67890",
    service_name="12345")
Copy
package main

import (
	"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 {
		_, err := Vrack.NewCloudProject(ctx, "vcp", &Vrack.CloudProjectArgs{
			ProjectId:   pulumi.String("67890"),
			ServiceName: pulumi.String("12345"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;

return await Deployment.RunAsync(() => 
{
    var vcp = new Ovh.Vrack.CloudProject("vcp", new()
    {
        ProjectId = "67890",
        ServiceName = "12345",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.Vrack.CloudProject;
import com.pulumi.ovh.Vrack.CloudProjectArgs;
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 vcp = new CloudProject("vcp", CloudProjectArgs.builder()
            .projectId("67890")
            .serviceName("12345")
            .build());

    }
}
Copy
resources:
  vcp:
    type: ovh:Vrack:CloudProject
    properties:
      projectId: '67890'
      serviceName: '12345'
Copy

Create CloudProject Resource

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

Constructor syntax

new CloudProject(name: string, args: CloudProjectArgs, opts?: CustomResourceOptions);
@overload
def CloudProject(resource_name: str,
                 args: CloudProjectArgs,
                 opts: Optional[ResourceOptions] = None)

@overload
def CloudProject(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 project_id: Optional[str] = None,
                 service_name: Optional[str] = None)
func NewCloudProject(ctx *Context, name string, args CloudProjectArgs, opts ...ResourceOption) (*CloudProject, error)
public CloudProject(string name, CloudProjectArgs args, CustomResourceOptions? opts = null)
public CloudProject(String name, CloudProjectArgs args)
public CloudProject(String name, CloudProjectArgs args, CustomResourceOptions options)
type: ovh:Vrack:CloudProject
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. CloudProjectArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. CloudProjectArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. CloudProjectArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CloudProjectArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. CloudProjectArgs
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 cloudProjectResource = new Ovh.Vrack.CloudProject("cloudProjectResource", new()
{
    ProjectId = "string",
    ServiceName = "string",
});
Copy
example, err := Vrack.NewCloudProject(ctx, "cloudProjectResource", &Vrack.CloudProjectArgs{
	ProjectId:   pulumi.String("string"),
	ServiceName: pulumi.String("string"),
})
Copy
var cloudProjectResource = new CloudProject("cloudProjectResource", CloudProjectArgs.builder()
    .projectId("string")
    .serviceName("string")
    .build());
Copy
cloud_project_resource = ovh.vrack.CloudProject("cloudProjectResource",
    project_id="string",
    service_name="string")
Copy
const cloudProjectResource = new ovh.vrack.CloudProject("cloudProjectResource", {
    projectId: "string",
    serviceName: "string",
});
Copy
type: ovh:Vrack:CloudProject
properties:
    projectId: string
    serviceName: string
Copy

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

ProjectId
This property is required.
Changes to this property will trigger replacement.
string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The service name of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The service name of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.
projectId
This property is required.
Changes to this property will trigger replacement.
String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The service name of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.
projectId
This property is required.
Changes to this property will trigger replacement.
string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
serviceName
This property is required.
Changes to this property will trigger replacement.
string
The service name of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.
project_id
This property is required.
Changes to this property will trigger replacement.
str
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
service_name
This property is required.
Changes to this property will trigger replacement.
str
The service name of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.
projectId
This property is required.
Changes to this property will trigger replacement.
String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The service name 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 CloudProject 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 CloudProject Resource

Get an existing CloudProject 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?: CloudProjectState, opts?: CustomResourceOptions): CloudProject
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        project_id: Optional[str] = None,
        service_name: Optional[str] = None) -> CloudProject
func GetCloudProject(ctx *Context, name string, id IDInput, state *CloudProjectState, opts ...ResourceOption) (*CloudProject, error)
public static CloudProject Get(string name, Input<string> id, CloudProjectState? state, CustomResourceOptions? opts = null)
public static CloudProject get(String name, Output<String> id, CloudProjectState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ProjectId Changes to this property will trigger replacement. string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
ServiceName Changes to this property will trigger replacement. string
The service name of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.
ProjectId Changes to this property will trigger replacement. string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
ServiceName Changes to this property will trigger replacement. string
The service name of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.
projectId Changes to this property will trigger replacement. String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
serviceName Changes to this property will trigger replacement. String
The service name of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.
projectId Changes to this property will trigger replacement. string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
serviceName Changes to this property will trigger replacement. string
The service name of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.
project_id Changes to this property will trigger replacement. str
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
service_name Changes to this property will trigger replacement. str
The service name of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.
projectId Changes to this property will trigger replacement. String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
serviceName Changes to this property will trigger replacement. String
The service name of the vrack. If omitted, the OVH_VRACK_SERVICE environment variable is used.

Import

Attachment of a public cloud project and a VRack can be imported using the service_name (vRack identifier) and the project_id (Cloud Project identifier), separated by “/” E.g.,

bash

$ pulumi import ovh:Vrack/cloudProject:CloudProject myattach service_name/project_id
Copy

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.