OVHCloud v2.8.0 published on Wednesday, Sep 24, 2025 by OVHcloud
ovh.getServers
Start a Neo task
Explain and create an ovh.getServers resource
Use this data source to get the list of dedicated servers associated with your OVHcloud Account.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const servers = ovh.getServers({});
import pulumi
import pulumi_ovh as ovh
servers = ovh.get_servers()
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.GetServers(ctx, map[string]interface{}{}, 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 servers = Ovh.GetServers.Invoke();
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.OvhFunctions;
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 servers = OvhFunctions.getServers(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
}
}
variables:
servers:
fn::invoke:
function: ovh:getServers
arguments: {}
Using getServers
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 getServers(opts?: InvokeOptions): Promise<GetServersResult>
function getServersOutput(opts?: InvokeOptions): Output<GetServersResult>def get_servers(opts: Optional[InvokeOptions] = None) -> GetServersResult
def get_servers_output(opts: Optional[InvokeOptions] = None) -> Output[GetServersResult]func GetServers(ctx *Context, opts ...InvokeOption) (*GetServersResult, error)
func GetServersOutput(ctx *Context, opts ...InvokeOption) GetServersResultOutput> Note: This function is named GetServers in the Go SDK.
public static class GetServers
{
public static Task<GetServersResult> InvokeAsync(InvokeOptions? opts = null)
public static Output<GetServersResult> Invoke(InvokeOptions? opts = null)
}public static CompletableFuture<GetServersResult> getServers(InvokeOptions options)
public static Output<GetServersResult> getServers(InvokeOptions options)
fn::invoke:
function: ovh:index/getServers:getServers
arguments:
# arguments dictionarygetServers Result
The following output properties are available:
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovhTerraform Provider.
