ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud
ibm.getDatabaseRemotes
Explore with Pulumi AI
Provides a read-only data source for database_remotes. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const database = ibm.getDatabase({
    name: "mydatabase",
    location: "us-east",
});
const databaseRemotes = database.then(database => ibm.getDatabaseRemotes({
    deploymentId: database.id,
}));
import pulumi
import pulumi_ibm as ibm
database = ibm.get_database(name="mydatabase",
    location="us-east")
database_remotes = ibm.get_database_remotes(deployment_id=database.id)
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		database, err := ibm.LookupDatabase(ctx, &ibm.LookupDatabaseArgs{
			Name:     "mydatabase",
			Location: pulumi.StringRef("us-east"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = ibm.GetDatabaseRemotes(ctx, &ibm.GetDatabaseRemotesArgs{
			DeploymentId: database.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() => 
{
    var database = Ibm.GetDatabase.Invoke(new()
    {
        Name = "mydatabase",
        Location = "us-east",
    });
    var databaseRemotes = Ibm.GetDatabaseRemotes.Invoke(new()
    {
        DeploymentId = database.Apply(getDatabaseResult => getDatabaseResult.Id),
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetDatabaseArgs;
import com.pulumi.ibm.inputs.GetDatabaseRemotesArgs;
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 database = IbmFunctions.getDatabase(GetDatabaseArgs.builder()
            .name("mydatabase")
            .location("us-east")
            .build());
        final var databaseRemotes = IbmFunctions.getDatabaseRemotes(GetDatabaseRemotesArgs.builder()
            .deploymentId(database.applyValue(getDatabaseResult -> getDatabaseResult.id()))
            .build());
    }
}
variables:
  database:
    fn::invoke:
      function: ibm:getDatabase
      arguments:
        name: mydatabase
        location: us-east
  databaseRemotes:
    fn::invoke:
      function: ibm:getDatabaseRemotes
      arguments:
        deploymentId: ${database.id}
Using getDatabaseRemotes
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 getDatabaseRemotes(args: GetDatabaseRemotesArgs, opts?: InvokeOptions): Promise<GetDatabaseRemotesResult>
function getDatabaseRemotesOutput(args: GetDatabaseRemotesOutputArgs, opts?: InvokeOptions): Output<GetDatabaseRemotesResult>def get_database_remotes(deployment_id: Optional[str] = None,
                         id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetDatabaseRemotesResult
def get_database_remotes_output(deployment_id: Optional[pulumi.Input[str]] = None,
                         id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseRemotesResult]func GetDatabaseRemotes(ctx *Context, args *GetDatabaseRemotesArgs, opts ...InvokeOption) (*GetDatabaseRemotesResult, error)
func GetDatabaseRemotesOutput(ctx *Context, args *GetDatabaseRemotesOutputArgs, opts ...InvokeOption) GetDatabaseRemotesResultOutput> Note: This function is named GetDatabaseRemotes in the Go SDK.
public static class GetDatabaseRemotes 
{
    public static Task<GetDatabaseRemotesResult> InvokeAsync(GetDatabaseRemotesArgs args, InvokeOptions? opts = null)
    public static Output<GetDatabaseRemotesResult> Invoke(GetDatabaseRemotesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDatabaseRemotesResult> getDatabaseRemotes(GetDatabaseRemotesArgs args, InvokeOptions options)
public static Output<GetDatabaseRemotesResult> getDatabaseRemotes(GetDatabaseRemotesArgs args, InvokeOptions options)
fn::invoke:
  function: ibm:index/getDatabaseRemotes:getDatabaseRemotes
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Deployment
Id string - Deployment ID.
 - Id string
 - The unique identifier of the database_remotes.
 
- Deployment
Id string - Deployment ID.
 - Id string
 - The unique identifier of the database_remotes.
 
- deployment
Id String - Deployment ID.
 - id String
 - The unique identifier of the database_remotes.
 
- deployment
Id string - Deployment ID.
 - id string
 - The unique identifier of the database_remotes.
 
- deployment_
id str - Deployment ID.
 - id str
 - The unique identifier of the database_remotes.
 
- deployment
Id String - Deployment ID.
 - id String
 - The unique identifier of the database_remotes.
 
getDatabaseRemotes Result
The following output properties are available:
- Deployment
Id string - Id string
 - The unique identifier of the database_remotes.
 - Leader string
 - (String) Leader ID, if applicable.
 - Replicas List<string>
 - (List) Replica IDs, if applicable.
 
- Deployment
Id string - Id string
 - The unique identifier of the database_remotes.
 - Leader string
 - (String) Leader ID, if applicable.
 - Replicas []string
 - (List) Replica IDs, if applicable.
 
- deployment
Id String - id String
 - The unique identifier of the database_remotes.
 - leader String
 - (String) Leader ID, if applicable.
 - replicas List<String>
 - (List) Replica IDs, if applicable.
 
- deployment
Id string - id string
 - The unique identifier of the database_remotes.
 - leader string
 - (String) Leader ID, if applicable.
 - replicas string[]
 - (List) Replica IDs, if applicable.
 
- deployment_
id str - id str
 - The unique identifier of the database_remotes.
 - leader str
 - (String) Leader ID, if applicable.
 - replicas Sequence[str]
 - (List) Replica IDs, if applicable.
 
- deployment
Id String - id String
 - The unique identifier of the database_remotes.
 - leader String
 - (String) Leader ID, if applicable.
 - replicas List<String>
 - (List) Replica IDs, if applicable.
 
Package Details
- Repository
 - ibm ibm-cloud/terraform-provider-ibm
 - License
 - Notes
 - This Pulumi package is based on the 
ibmTerraform Provider.