harness.platform.DbInstance
Explore with Pulumi AI
Resource for creating a Harness DBDevOps Instance.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const test = new harness.platform.DbInstance("test", {
identifier: "identifier",
orgId: "org_id",
projectId: "project_id",
name: "name",
tags: [
"foo:bar",
"bar:foo",
],
schema: "schema1",
branch: "main",
connector: "jdbcConnector",
context: "ctx",
});
import pulumi
import pulumi_harness as harness
test = harness.platform.DbInstance("test",
identifier="identifier",
org_id="org_id",
project_id="project_id",
name="name",
tags=[
"foo:bar",
"bar:foo",
],
schema="schema1",
branch="main",
connector="jdbcConnector",
context="ctx")
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.NewDbInstance(ctx, "test", &platform.DbInstanceArgs{
Identifier: pulumi.String("identifier"),
OrgId: pulumi.String("org_id"),
ProjectId: pulumi.String("project_id"),
Name: pulumi.String("name"),
Tags: pulumi.StringArray{
pulumi.String("foo:bar"),
pulumi.String("bar:foo"),
},
Schema: pulumi.String("schema1"),
Branch: pulumi.String("main"),
Connector: pulumi.String("jdbcConnector"),
Context: pulumi.String("ctx"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() =>
{
var test = new Harness.Platform.DbInstance("test", new()
{
Identifier = "identifier",
OrgId = "org_id",
ProjectId = "project_id",
Name = "name",
Tags = new[]
{
"foo:bar",
"bar:foo",
},
Schema = "schema1",
Branch = "main",
Connector = "jdbcConnector",
Context = "ctx",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.DbInstance;
import com.pulumi.harness.platform.DbInstanceArgs;
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) {
var test = new DbInstance("test", DbInstanceArgs.builder()
.identifier("identifier")
.orgId("org_id")
.projectId("project_id")
.name("name")
.tags(
"foo:bar",
"bar:foo")
.schema("schema1")
.branch("main")
.connector("jdbcConnector")
.context("ctx")
.build());
}
}
resources:
test:
type: harness:platform:DbInstance
properties:
identifier: identifier
orgId: org_id
projectId: project_id
name: name
tags:
- foo:bar
- bar:foo
schema: schema1
branch: main
connector: jdbcConnector
context: ctx
Create DbInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DbInstance(name: string, args: DbInstanceArgs, opts?: CustomResourceOptions);
@overload
def DbInstance(resource_name: str,
args: DbInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DbInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
connector: Optional[str] = None,
identifier: Optional[str] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
schema: Optional[str] = None,
branch: Optional[str] = None,
context: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
tags: Optional[Sequence[str]] = None)
func NewDbInstance(ctx *Context, name string, args DbInstanceArgs, opts ...ResourceOption) (*DbInstance, error)
public DbInstance(string name, DbInstanceArgs args, CustomResourceOptions? opts = null)
public DbInstance(String name, DbInstanceArgs args)
public DbInstance(String name, DbInstanceArgs args, CustomResourceOptions options)
type: harness:platform:DbInstance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DbInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DbInstanceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DbInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DbInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DbInstanceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var dbInstanceResource = new Harness.Platform.DbInstance("dbInstanceResource", new()
{
Connector = "string",
Identifier = "string",
OrgId = "string",
ProjectId = "string",
Schema = "string",
Branch = "string",
Context = "string",
Description = "string",
Name = "string",
Tags = new[]
{
"string",
},
});
example, err := platform.NewDbInstance(ctx, "dbInstanceResource", &platform.DbInstanceArgs{
Connector: pulumi.String("string"),
Identifier: pulumi.String("string"),
OrgId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Schema: pulumi.String("string"),
Branch: pulumi.String("string"),
Context: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
var dbInstanceResource = new DbInstance("dbInstanceResource", DbInstanceArgs.builder()
.connector("string")
.identifier("string")
.orgId("string")
.projectId("string")
.schema("string")
.branch("string")
.context("string")
.description("string")
.name("string")
.tags("string")
.build());
db_instance_resource = harness.platform.DbInstance("dbInstanceResource",
connector="string",
identifier="string",
org_id="string",
project_id="string",
schema="string",
branch="string",
context="string",
description="string",
name="string",
tags=["string"])
const dbInstanceResource = new harness.platform.DbInstance("dbInstanceResource", {
connector: "string",
identifier: "string",
orgId: "string",
projectId: "string",
schema: "string",
branch: "string",
context: "string",
description: "string",
name: "string",
tags: ["string"],
});
type: harness:platform:DbInstance
properties:
branch: string
connector: string
context: string
description: string
identifier: string
name: string
orgId: string
projectId: string
schema: string
tags:
- string
DbInstance Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The DbInstance resource accepts the following input properties:
- Connector string
- The connector to database
- Identifier string
- Unique identifier of the resource.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- Schema string
- The identifier of the parent database schema
- Branch string
- The branch of changeSet repository
- Context string
- The liquibase context
- Description string
- Description of the resource.
- Name string
- Name of the resource.
- List<string>
- Tags to associate with the resource.
- Connector string
- The connector to database
- Identifier string
- Unique identifier of the resource.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- Schema string
- The identifier of the parent database schema
- Branch string
- The branch of changeSet repository
- Context string
- The liquibase context
- Description string
- Description of the resource.
- Name string
- Name of the resource.
- []string
- Tags to associate with the resource.
- connector String
- The connector to database
- identifier String
- Unique identifier of the resource.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- schema String
- The identifier of the parent database schema
- branch String
- The branch of changeSet repository
- context String
- The liquibase context
- description String
- Description of the resource.
- name String
- Name of the resource.
- List<String>
- Tags to associate with the resource.
- connector string
- The connector to database
- identifier string
- Unique identifier of the resource.
- org
Id string - Unique identifier of the organization.
- project
Id string - Unique identifier of the project.
- schema string
- The identifier of the parent database schema
- branch string
- The branch of changeSet repository
- context string
- The liquibase context
- description string
- Description of the resource.
- name string
- Name of the resource.
- string[]
- Tags to associate with the resource.
- connector str
- The connector to database
- 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
- branch str
- The branch of changeSet repository
- context str
- The liquibase context
- description str
- Description of the resource.
- name str
- Name of the resource.
- Sequence[str]
- Tags to associate with the resource.
- connector String
- The connector to database
- identifier String
- Unique identifier of the resource.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- schema String
- The identifier of the parent database schema
- branch String
- The branch of changeSet repository
- context String
- The liquibase context
- description String
- Description of the resource.
- name String
- Name of the resource.
- List<String>
- Tags to associate with the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the DbInstance resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing DbInstance Resource
Get an existing DbInstance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DbInstanceState, opts?: CustomResourceOptions): DbInstance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
branch: Optional[str] = None,
connector: Optional[str] = None,
context: Optional[str] = None,
description: Optional[str] = None,
identifier: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
schema: Optional[str] = None,
tags: Optional[Sequence[str]] = None) -> DbInstance
func GetDbInstance(ctx *Context, name string, id IDInput, state *DbInstanceState, opts ...ResourceOption) (*DbInstance, error)
public static DbInstance Get(string name, Input<string> id, DbInstanceState? state, CustomResourceOptions? opts = null)
public static DbInstance get(String name, Output<String> id, DbInstanceState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Branch string
- The branch of changeSet repository
- Connector string
- The connector to database
- Context string
- The liquibase context
- Description string
- Description of the resource.
- Identifier string
- Unique identifier of the resource.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- Schema string
- The identifier of the parent database schema
- List<string>
- Tags to associate with 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.
- Identifier string
- Unique identifier of the resource.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- Schema string
- The identifier of the parent database schema
- []string
- Tags to associate with 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.
- identifier String
- Unique identifier of the resource.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- schema String
- The identifier of the parent database schema
- List<String>
- Tags to associate with 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.
- identifier string
- Unique identifier of the resource.
- name string
- Name of the resource.
- org
Id string - Unique identifier of the organization.
- project
Id string - Unique identifier of the project.
- schema string
- The identifier of the parent database schema
- string[]
- Tags to associate with 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.
- identifier str
- Unique identifier of the resource.
- name str
- Name 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
- Sequence[str]
- Tags to associate with 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.
- identifier String
- Unique identifier of the resource.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- schema String
- The identifier of the parent database schema
- List<String>
- Tags to associate with the resource.
Import
Import project level db instance
$ pulumi import harness:platform/dbInstance:DbInstance example <org_id>/<project_id>/<db_schema_id>/<db_instance_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.