1. Packages
  2. Harness Provider
  3. API Docs
  4. platform
  5. getDbInstance
Harness v0.7.3 published on Friday, Apr 18, 2025 by Pulumi

harness.platform.getDbInstance

Explore with Pulumi AI

Harness v0.7.3 published on Friday, Apr 18, 2025 by Pulumi

Data source for retrieving a Harness DBDevOps Instance.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";

const example = harness.platform.getDbInstance({
    identifier: "identifier",
    orgId: "org_id",
    projectId: "project_id",
    schema: "schema1",
});
Copy
import pulumi
import pulumi_harness as harness

example = harness.platform.get_db_instance(identifier="identifier",
    org_id="org_id",
    project_id="project_id",
    schema="schema1")
Copy
package main

import (
	"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := platform.LookupDbInstance(ctx, &platform.LookupDbInstanceArgs{
			Identifier: "identifier",
			OrgId:      "org_id",
			ProjectId:  "project_id",
			Schema:     "schema1",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;

return await Deployment.RunAsync(() => 
{
    var example = Harness.Platform.GetDbInstance.Invoke(new()
    {
        Identifier = "identifier",
        OrgId = "org_id",
        ProjectId = "project_id",
        Schema = "schema1",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.PlatformFunctions;
import com.pulumi.harness.platform.inputs.GetDbInstanceArgs;
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 = PlatformFunctions.getDbInstance(GetDbInstanceArgs.builder()
            .identifier("identifier")
            .orgId("org_id")
            .projectId("project_id")
            .schema("schema1")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: harness:platform:getDbInstance
      arguments:
        identifier: identifier
        orgId: org_id
        projectId: project_id
        schema: schema1
Copy

Using getDbInstance

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 getDbInstance(args: GetDbInstanceArgs, opts?: InvokeOptions): Promise<GetDbInstanceResult>
function getDbInstanceOutput(args: GetDbInstanceOutputArgs, opts?: InvokeOptions): Output<GetDbInstanceResult>
Copy
def get_db_instance(identifier: Optional[str] = None,
                    name: Optional[str] = None,
                    org_id: Optional[str] = None,
                    project_id: Optional[str] = None,
                    schema: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetDbInstanceResult
def get_db_instance_output(identifier: Optional[pulumi.Input[str]] = None,
                    name: Optional[pulumi.Input[str]] = None,
                    org_id: Optional[pulumi.Input[str]] = None,
                    project_id: Optional[pulumi.Input[str]] = None,
                    schema: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetDbInstanceResult]
Copy
func LookupDbInstance(ctx *Context, args *LookupDbInstanceArgs, opts ...InvokeOption) (*LookupDbInstanceResult, error)
func LookupDbInstanceOutput(ctx *Context, args *LookupDbInstanceOutputArgs, opts ...InvokeOption) LookupDbInstanceResultOutput
Copy

> Note: This function is named LookupDbInstance in the Go SDK.

public static class GetDbInstance 
{
    public static Task<GetDbInstanceResult> InvokeAsync(GetDbInstanceArgs args, InvokeOptions? opts = null)
    public static Output<GetDbInstanceResult> Invoke(GetDbInstanceInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDbInstanceResult> getDbInstance(GetDbInstanceArgs args, InvokeOptions options)
public static Output<GetDbInstanceResult> getDbInstance(GetDbInstanceArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: harness:platform/getDbInstance:getDbInstance
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Identifier
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the resource.
OrgId
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the organization.
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the project.
Schema This property is required. string
The identifier of the parent database schema
Name string
Name of the resource.
Identifier
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the resource.
OrgId
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the organization.
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the project.
Schema This property is required. string
The identifier of the parent database schema
Name string
Name of the resource.
identifier
This property is required.
Changes to this property will trigger replacement.
String
Unique identifier of the resource.
orgId
This property is required.
Changes to this property will trigger replacement.
String
Unique identifier of the organization.
projectId
This property is required.
Changes to this property will trigger replacement.
String
Unique identifier of the project.
schema This property is required. String
The identifier of the parent database schema
name String
Name of the resource.
identifier
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the resource.
orgId
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the organization.
projectId
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the project.
schema This property is required. string
The identifier of the parent database schema
name string
Name of the resource.
identifier
This property is required.
Changes to this property will trigger replacement.
str
Unique identifier of the resource.
org_id
This property is required.
Changes to this property will trigger replacement.
str
Unique identifier of the organization.
project_id
This property is required.
Changes to this property will trigger replacement.
str
Unique identifier of the project.
schema This property is required. str
The identifier of the parent database schema
name str
Name of the resource.
identifier
This property is required.
Changes to this property will trigger replacement.
String
Unique identifier of the resource.
orgId
This property is required.
Changes to this property will trigger replacement.
String
Unique identifier of the organization.
projectId
This property is required.
Changes to this property will trigger replacement.
String
Unique identifier of the project.
schema This property is required. String
The identifier of the parent database schema
name String
Name of the resource.

getDbInstance Result

The following output properties are available:

Branch string
The branch of changeSet repository
Connector string
The connector to database
Context string
The liquibase context
Description string
Description of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Identifier string
Unique identifier of the resource.
OrgId string
Unique identifier of the organization.
ProjectId string
Unique identifier of the project.
Schema string
The identifier of the parent database schema
Tags List<string>
Tags to associate with the resource.
Name string
Name of the resource.
Branch string
The branch of changeSet repository
Connector string
The connector to database
Context string
The liquibase context
Description string
Description of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Identifier string
Unique identifier of the resource.
OrgId string
Unique identifier of the organization.
ProjectId string
Unique identifier of the project.
Schema string
The identifier of the parent database schema
Tags []string
Tags to associate with the resource.
Name string
Name of the resource.
branch String
The branch of changeSet repository
connector String
The connector to database
context String
The liquibase context
description String
Description of the resource.
id String
The provider-assigned unique ID for this managed resource.
identifier String
Unique identifier of the resource.
orgId String
Unique identifier of the organization.
projectId String
Unique identifier of the project.
schema String
The identifier of the parent database schema
tags List<String>
Tags to associate with the resource.
name String
Name of the resource.
branch string
The branch of changeSet repository
connector string
The connector to database
context string
The liquibase context
description string
Description of the resource.
id string
The provider-assigned unique ID for this managed resource.
identifier string
Unique identifier of the resource.
orgId string
Unique identifier of the organization.
projectId string
Unique identifier of the project.
schema string
The identifier of the parent database schema
tags string[]
Tags to associate with the resource.
name string
Name of the resource.
branch str
The branch of changeSet repository
connector str
The connector to database
context str
The liquibase context
description str
Description of the resource.
id str
The provider-assigned unique ID for this managed resource.
identifier str
Unique identifier of the resource.
org_id str
Unique identifier of the organization.
project_id str
Unique identifier of the project.
schema str
The identifier of the parent database schema
tags Sequence[str]
Tags to associate with the resource.
name str
Name of the resource.
branch String
The branch of changeSet repository
connector String
The connector to database
context String
The liquibase context
description String
Description of the resource.
id String
The provider-assigned unique ID for this managed resource.
identifier String
Unique identifier of the resource.
orgId String
Unique identifier of the organization.
projectId String
Unique identifier of the project.
schema String
The identifier of the parent database schema
tags List<String>
Tags to associate with the resource.
name String
Name of the resource.

Package Details

Repository
harness pulumi/pulumi-harness
License
Apache-2.0
Notes
This Pulumi package is based on the harness Terraform Provider.
Harness v0.7.3 published on Friday, Apr 18, 2025 by Pulumi