Viewing docs for OVHCloud v2.12.0
published on Thursday, Mar 12, 2026 by OVHcloud
published on Thursday, Mar 12, 2026 by OVHcloud
Viewing docs for OVHCloud v2.12.0
published on Thursday, Mar 12, 2026 by OVHcloud
published on Thursday, Mar 12, 2026 by OVHcloud
This datasource uses a Beta API Use this data source to get the instance of a public cloud project.
Example Usage
To get information of an instance:
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const instance = ovh.CloudProject.getInstance({
serviceName: "YYYY",
region: "XXXX",
instanceId: "ZZZZZ",
});
import pulumi
import pulumi_ovh as ovh
instance = ovh.CloudProject.get_instance(service_name="YYYY",
region="XXXX",
instance_id="ZZZZZ")
package main
import (
"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudproject"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudproject.GetInstance(ctx, &cloudproject.GetInstanceArgs{
ServiceName: "YYYY",
Region: "XXXX",
InstanceId: "ZZZZZ",
}, nil)
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 instance = Ovh.CloudProject.GetInstance.Invoke(new()
{
ServiceName = "YYYY",
Region = "XXXX",
InstanceId = "ZZZZZ",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.CloudProject.CloudProjectFunctions;
import com.pulumi.ovh.CloudProject.inputs.GetInstanceArgs;
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 instance = CloudProjectFunctions.getInstance(GetInstanceArgs.builder()
.serviceName("YYYY")
.region("XXXX")
.instanceId("ZZZZZ")
.build());
}
}
variables:
instance:
fn::invoke:
function: ovh:CloudProject:getInstance
arguments:
serviceName: YYYY
region: XXXX
instanceId: ZZZZZ
Using getInstance
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getInstance(args: GetInstanceArgs, opts?: InvokeOptions): Promise<GetInstanceResult>
function getInstanceOutput(args: GetInstanceOutputArgs, opts?: InvokeOptions): Output<GetInstanceResult>def get_instance(instance_id: Optional[str] = None,
region: Optional[str] = None,
service_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetInstanceResult
def get_instance_output(instance_id: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
service_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetInstanceResult]func LookupInstance(ctx *Context, args *LookupInstanceArgs, opts ...InvokeOption) (*LookupInstanceResult, error)
func LookupInstanceOutput(ctx *Context, args *LookupInstanceOutputArgs, opts ...InvokeOption) LookupInstanceResultOutput> Note: This function is named LookupInstance in the Go SDK.
public static class GetInstance
{
public static Task<GetInstanceResult> InvokeAsync(GetInstanceArgs args, InvokeOptions? opts = null)
public static Output<GetInstanceResult> Invoke(GetInstanceInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetInstanceResult> getInstance(GetInstanceArgs args, InvokeOptions options)
public static Output<GetInstanceResult> getInstance(GetInstanceArgs args, InvokeOptions options)
fn::invoke:
function: ovh:CloudProject/getInstance:getInstance
arguments:
# arguments dictionaryThe following arguments are supported:
- Instance
Id string - Instance id
- Region string
- Instance region
- Service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used
- Instance
Id string - Instance id
- Region string
- Instance region
- Service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used
- instance
Id String - Instance id
- region String
- Instance region
- service
Name String - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used
- instance
Id string - Instance id
- region string
- Instance region
- service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used
- instance_
id str - Instance id
- region str
- Instance region
- service_
name str - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used
- instance
Id String - Instance id
- region String
- Instance region
- service
Name String - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used
getInstance Result
The following output properties are available:
- Addresses
List<Get
Instance Address> - Instance IP addresses
- Attached
Volumes List<GetInstance Attached Volume> - Volumes attached to the instance
- Availability
Zone string - Availability zone of the instance
- Flavor
Id string - Flavor id
- Flavor
Name string - Flavor name
- Id string
- The provider-assigned unique ID for this managed resource.
- Image
Id string - Image id
- Instance
Id string - Name string
- Instance name
- Region string
- Service
Name string - Ssh
Key string - SSH Keypair
- Status string
- Instance status
- Task
State string - Instance task state
- Addresses
[]Get
Instance Address - Instance IP addresses
- Attached
Volumes []GetInstance Attached Volume - Volumes attached to the instance
- Availability
Zone string - Availability zone of the instance
- Flavor
Id string - Flavor id
- Flavor
Name string - Flavor name
- Id string
- The provider-assigned unique ID for this managed resource.
- Image
Id string - Image id
- Instance
Id string - Name string
- Instance name
- Region string
- Service
Name string - Ssh
Key string - SSH Keypair
- Status string
- Instance status
- Task
State string - Instance task state
- addresses
List<Get
Instance Address> - Instance IP addresses
- attached
Volumes List<GetInstance Attached Volume> - Volumes attached to the instance
- availability
Zone String - Availability zone of the instance
- flavor
Id String - Flavor id
- flavor
Name String - Flavor name
- id String
- The provider-assigned unique ID for this managed resource.
- image
Id String - Image id
- instance
Id String - name String
- Instance name
- region String
- service
Name String - ssh
Key String - SSH Keypair
- status String
- Instance status
- task
State String - Instance task state
- addresses
Get
Instance Address[] - Instance IP addresses
- attached
Volumes GetInstance Attached Volume[] - Volumes attached to the instance
- availability
Zone string - Availability zone of the instance
- flavor
Id string - Flavor id
- flavor
Name string - Flavor name
- id string
- The provider-assigned unique ID for this managed resource.
- image
Id string - Image id
- instance
Id string - name string
- Instance name
- region string
- service
Name string - ssh
Key string - SSH Keypair
- status string
- Instance status
- task
State string - Instance task state
- addresses
Sequence[Get
Instance Address] - Instance IP addresses
- attached_
volumes Sequence[GetInstance Attached Volume] - Volumes attached to the instance
- availability_
zone str - Availability zone of the instance
- flavor_
id str - Flavor id
- flavor_
name str - Flavor name
- id str
- The provider-assigned unique ID for this managed resource.
- image_
id str - Image id
- instance_
id str - name str
- Instance name
- region str
- service_
name str - ssh_
key str - SSH Keypair
- status str
- Instance status
- task_
state str - Instance task state
- addresses List<Property Map>
- Instance IP addresses
- attached
Volumes List<Property Map> - Volumes attached to the instance
- availability
Zone String - Availability zone of the instance
- flavor
Id String - Flavor id
- flavor
Name String - Flavor name
- id String
- The provider-assigned unique ID for this managed resource.
- image
Id String - Image id
- instance
Id String - name String
- Instance name
- region String
- service
Name String - ssh
Key String - SSH Keypair
- status String
- Instance status
- task
State String - Instance task state
Supporting Types
GetInstanceAddress
GetInstanceAttachedVolume
- Id string
- Instance id
- Id string
- Instance id
- id String
- Instance id
- id string
- Instance id
- id str
- Instance id
- id String
- Instance id
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovhTerraform Provider.
Viewing docs for OVHCloud v2.12.0
published on Thursday, Mar 12, 2026 by OVHcloud
published on Thursday, Mar 12, 2026 by OVHcloud
