published on Wednesday, Apr 15, 2026 by ionos-cloud
published on Wednesday, Apr 15, 2026 by ionos-cloud
The DbaaS Postgres Versions data source can be used to search for and retrieve list of available postgres versions for a specific cluster or for all clusters.
Example Usage
Retrieve list of postgres versions for a specific cluster
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
const example = ionoscloud.dbaas.getPSQLVersions({
clusterId: "cluster_id",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.dbaas.get_psql_versions(cluster_id="cluster_id")
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/dbaas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dbaas.GetPSQLVersions(ctx, &dbaas.GetPSQLVersionsArgs{
ClusterId: pulumi.StringRef("cluster_id"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.Dbaas.GetPSQLVersions.Invoke(new()
{
ClusterId = "cluster_id",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.dbaas.DbaasFunctions;
import com.pulumi.ionoscloud.dbaas.inputs.GetPSQLVersionsArgs;
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 example = DbaasFunctions.getPSQLVersions(GetPSQLVersionsArgs.builder()
.clusterId("cluster_id")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:dbaas:getPSQLVersions
arguments:
clusterId: cluster_id
Retrieve list of postgres versions for all clusters
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
const example = ionoscloud.dbaas.getPSQLVersions({});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.dbaas.get_psql_versions()
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/dbaas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dbaas.GetPSQLVersions(ctx, &dbaas.GetPSQLVersionsArgs{}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.Dbaas.GetPSQLVersions.Invoke();
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.dbaas.DbaasFunctions;
import com.pulumi.ionoscloud.dbaas.inputs.GetPSQLVersionsArgs;
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 example = DbaasFunctions.getPSQLVersions(GetPSQLVersionsArgs.builder()
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:dbaas:getPSQLVersions
arguments: {}
Using getPSQLVersions
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 getPSQLVersions(args: GetPSQLVersionsArgs, opts?: InvokeOptions): Promise<GetPSQLVersionsResult>
function getPSQLVersionsOutput(args: GetPSQLVersionsOutputArgs, opts?: InvokeOptions): Output<GetPSQLVersionsResult>def get_psql_versions(cluster_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPSQLVersionsResult
def get_psql_versions_output(cluster_id: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPSQLVersionsResult]func GetPSQLVersions(ctx *Context, args *GetPSQLVersionsArgs, opts ...InvokeOption) (*GetPSQLVersionsResult, error)
func GetPSQLVersionsOutput(ctx *Context, args *GetPSQLVersionsOutputArgs, opts ...InvokeOption) GetPSQLVersionsResultOutput> Note: This function is named GetPSQLVersions in the Go SDK.
public static class GetPSQLVersions
{
public static Task<GetPSQLVersionsResult> InvokeAsync(GetPSQLVersionsArgs args, InvokeOptions? opts = null)
public static Output<GetPSQLVersionsResult> Invoke(GetPSQLVersionsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPSQLVersionsResult> getPSQLVersions(GetPSQLVersionsArgs args, InvokeOptions options)
public static Output<GetPSQLVersionsResult> getPSQLVersions(GetPSQLVersionsArgs args, InvokeOptions options)
fn::invoke:
function: ionoscloud:dbaas/getPSQLVersions:getPSQLVersions
arguments:
# arguments dictionaryThe following arguments are supported:
- Cluster
Id string The unique ID of the cluster.
If
clusterIdis not provided the data source will return the list of postgres version for all cluster.
- Cluster
Id string The unique ID of the cluster.
If
clusterIdis not provided the data source will return the list of postgres version for all cluster.
- cluster
Id String The unique ID of the cluster.
If
clusterIdis not provided the data source will return the list of postgres version for all cluster.
- cluster
Id string The unique ID of the cluster.
If
clusterIdis not provided the data source will return the list of postgres version for all cluster.
- cluster_
id str The unique ID of the cluster.
If
clusterIdis not provided the data source will return the list of postgres version for all cluster.
- cluster
Id String The unique ID of the cluster.
If
clusterIdis not provided the data source will return the list of postgres version for all cluster.
getPSQLVersions Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Postgres
Versions List<string> - list of PostgreSQL versions.
- Cluster
Id string - Id of the cluster
- Id string
- The provider-assigned unique ID for this managed resource.
- Postgres
Versions []string - list of PostgreSQL versions.
- Cluster
Id string - Id of the cluster
- id String
- The provider-assigned unique ID for this managed resource.
- postgres
Versions List<String> - list of PostgreSQL versions.
- cluster
Id String - Id of the cluster
- id string
- The provider-assigned unique ID for this managed resource.
- postgres
Versions string[] - list of PostgreSQL versions.
- cluster
Id string - Id of the cluster
- id str
- The provider-assigned unique ID for this managed resource.
- postgres_
versions Sequence[str] - list of PostgreSQL versions.
- cluster_
id str - Id of the cluster
- id String
- The provider-assigned unique ID for this managed resource.
- postgres
Versions List<String> - list of PostgreSQL versions.
- cluster
Id String - Id of the cluster
Package Details
- Repository
- ionoscloud ionos-cloud/pulumi-ionoscloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ionoscloudTerraform Provider.
published on Wednesday, Apr 15, 2026 by ionos-cloud
