1. Packages
  2. Harness Provider
  3. API Docs
  4. platform
  5. DbSchema
Harness v0.7.2 published on Tuesday, Apr 15, 2025 by Pulumi

harness.platform.DbSchema

Explore with Pulumi AI

Resource for creating a Harness DBDevOps Schema.

Create DbSchema Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new DbSchema(name: string, args: DbSchemaArgs, opts?: CustomResourceOptions);
@overload
def DbSchema(resource_name: str,
             args: DbSchemaArgs,
             opts: Optional[ResourceOptions] = None)

@overload
def DbSchema(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             identifier: Optional[str] = None,
             org_id: Optional[str] = None,
             project_id: Optional[str] = None,
             changelog_script: Optional[DbSchemaChangelogScriptArgs] = None,
             description: Optional[str] = None,
             name: Optional[str] = None,
             schema_source: Optional[DbSchemaSchemaSourceArgs] = None,
             service: Optional[str] = None,
             tags: Optional[Sequence[str]] = None,
             type: Optional[str] = None)
func NewDbSchema(ctx *Context, name string, args DbSchemaArgs, opts ...ResourceOption) (*DbSchema, error)
public DbSchema(string name, DbSchemaArgs args, CustomResourceOptions? opts = null)
public DbSchema(String name, DbSchemaArgs args)
public DbSchema(String name, DbSchemaArgs args, CustomResourceOptions options)
type: harness:platform:DbSchema
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DbSchemaArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DbSchemaArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DbSchemaArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DbSchemaArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DbSchemaArgs
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 dbSchemaResource = new Harness.Platform.DbSchema("dbSchemaResource", new()
{
    Identifier = "string",
    OrgId = "string",
    ProjectId = "string",
    ChangelogScript = new Harness.Platform.Inputs.DbSchemaChangelogScriptArgs
    {
        Command = "string",
        Image = "string",
        Location = "string",
        Shell = "string",
    },
    Description = "string",
    Name = "string",
    SchemaSource = new Harness.Platform.Inputs.DbSchemaSchemaSourceArgs
    {
        Connector = "string",
        Location = "string",
        ArchivePath = "string",
        Repo = "string",
    },
    Service = "string",
    Tags = new[]
    {
        "string",
    },
    Type = "string",
});
Copy
example, err := platform.NewDbSchema(ctx, "dbSchemaResource", &platform.DbSchemaArgs{
	Identifier: pulumi.String("string"),
	OrgId:      pulumi.String("string"),
	ProjectId:  pulumi.String("string"),
	ChangelogScript: &platform.DbSchemaChangelogScriptArgs{
		Command:  pulumi.String("string"),
		Image:    pulumi.String("string"),
		Location: pulumi.String("string"),
		Shell:    pulumi.String("string"),
	},
	Description: pulumi.String("string"),
	Name:        pulumi.String("string"),
	SchemaSource: &platform.DbSchemaSchemaSourceArgs{
		Connector:   pulumi.String("string"),
		Location:    pulumi.String("string"),
		ArchivePath: pulumi.String("string"),
		Repo:        pulumi.String("string"),
	},
	Service: pulumi.String("string"),
	Tags: pulumi.StringArray{
		pulumi.String("string"),
	},
	Type: pulumi.String("string"),
})
Copy
var dbSchemaResource = new DbSchema("dbSchemaResource", DbSchemaArgs.builder()
    .identifier("string")
    .orgId("string")
    .projectId("string")
    .changelogScript(DbSchemaChangelogScriptArgs.builder()
        .command("string")
        .image("string")
        .location("string")
        .shell("string")
        .build())
    .description("string")
    .name("string")
    .schemaSource(DbSchemaSchemaSourceArgs.builder()
        .connector("string")
        .location("string")
        .archivePath("string")
        .repo("string")
        .build())
    .service("string")
    .tags("string")
    .type("string")
    .build());
Copy
db_schema_resource = harness.platform.DbSchema("dbSchemaResource",
    identifier="string",
    org_id="string",
    project_id="string",
    changelog_script={
        "command": "string",
        "image": "string",
        "location": "string",
        "shell": "string",
    },
    description="string",
    name="string",
    schema_source={
        "connector": "string",
        "location": "string",
        "archive_path": "string",
        "repo": "string",
    },
    service="string",
    tags=["string"],
    type="string")
Copy
const dbSchemaResource = new harness.platform.DbSchema("dbSchemaResource", {
    identifier: "string",
    orgId: "string",
    projectId: "string",
    changelogScript: {
        command: "string",
        image: "string",
        location: "string",
        shell: "string",
    },
    description: "string",
    name: "string",
    schemaSource: {
        connector: "string",
        location: "string",
        archivePath: "string",
        repo: "string",
    },
    service: "string",
    tags: ["string"],
    type: "string",
});
Copy
type: harness:platform:DbSchema
properties:
    changelogScript:
        command: string
        image: string
        location: string
        shell: string
    description: string
    identifier: string
    name: string
    orgId: string
    projectId: string
    schemaSource:
        archivePath: string
        connector: string
        location: string
        repo: string
    service: string
    tags:
        - string
    type: string
Copy

DbSchema 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 DbSchema resource accepts the following input properties:

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.
ChangelogScript DbSchemaChangelogScript
Changelog script details
Description string
Description of the resource.
Name string
Name of the resource.
SchemaSource DbSchemaSchemaSource
Provides a connector and path at which to find the database schema representation
Service string
The service associated with schema.
Tags List<string>
Tags to associate with the resource.
Type string
Type of the database schema (repository/script).
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.
ChangelogScript DbSchemaChangelogScriptArgs
Changelog script details
Description string
Description of the resource.
Name string
Name of the resource.
SchemaSource DbSchemaSchemaSourceArgs
Provides a connector and path at which to find the database schema representation
Service string
The service associated with schema.
Tags []string
Tags to associate with the resource.
Type string
Type of the database schema (repository/script).
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.
changelogScript DbSchemaChangelogScript
Changelog script details
description String
Description of the resource.
name String
Name of the resource.
schemaSource DbSchemaSchemaSource
Provides a connector and path at which to find the database schema representation
service String
The service associated with schema.
tags List<String>
Tags to associate with the resource.
type String
Type of the database schema (repository/script).
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.
changelogScript DbSchemaChangelogScript
Changelog script details
description string
Description of the resource.
name string
Name of the resource.
schemaSource DbSchemaSchemaSource
Provides a connector and path at which to find the database schema representation
service string
The service associated with schema.
tags string[]
Tags to associate with the resource.
type string
Type of the database schema (repository/script).
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.
changelog_script DbSchemaChangelogScriptArgs
Changelog script details
description str
Description of the resource.
name str
Name of the resource.
schema_source DbSchemaSchemaSourceArgs
Provides a connector and path at which to find the database schema representation
service str
The service associated with schema.
tags Sequence[str]
Tags to associate with the resource.
type str
Type of the database schema (repository/script).
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.
changelogScript Property Map
Changelog script details
description String
Description of the resource.
name String
Name of the resource.
schemaSource Property Map
Provides a connector and path at which to find the database schema representation
service String
The service associated with schema.
tags List<String>
Tags to associate with the resource.
type String
Type of the database schema (repository/script).

Outputs

All input properties are implicitly available as output properties. Additionally, the DbSchema 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 DbSchema Resource

Get an existing DbSchema 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?: DbSchemaState, opts?: CustomResourceOptions): DbSchema
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        changelog_script: Optional[DbSchemaChangelogScriptArgs] = None,
        description: Optional[str] = None,
        identifier: Optional[str] = None,
        name: Optional[str] = None,
        org_id: Optional[str] = None,
        project_id: Optional[str] = None,
        schema_source: Optional[DbSchemaSchemaSourceArgs] = None,
        service: Optional[str] = None,
        tags: Optional[Sequence[str]] = None,
        type: Optional[str] = None) -> DbSchema
func GetDbSchema(ctx *Context, name string, id IDInput, state *DbSchemaState, opts ...ResourceOption) (*DbSchema, error)
public static DbSchema Get(string name, Input<string> id, DbSchemaState? state, CustomResourceOptions? opts = null)
public static DbSchema get(String name, Output<String> id, DbSchemaState state, CustomResourceOptions options)
resources:  _:    type: harness:platform:DbSchema    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
ChangelogScript DbSchemaChangelogScript
Changelog script details
Description string
Description of the resource.
Identifier Changes to this property will trigger replacement. string
Unique identifier of the resource.
Name string
Name of the resource.
OrgId Changes to this property will trigger replacement. string
Unique identifier of the organization.
ProjectId Changes to this property will trigger replacement. string
Unique identifier of the project.
SchemaSource DbSchemaSchemaSource
Provides a connector and path at which to find the database schema representation
Service string
The service associated with schema.
Tags List<string>
Tags to associate with the resource.
Type string
Type of the database schema (repository/script).
ChangelogScript DbSchemaChangelogScriptArgs
Changelog script details
Description string
Description of the resource.
Identifier Changes to this property will trigger replacement. string
Unique identifier of the resource.
Name string
Name of the resource.
OrgId Changes to this property will trigger replacement. string
Unique identifier of the organization.
ProjectId Changes to this property will trigger replacement. string
Unique identifier of the project.
SchemaSource DbSchemaSchemaSourceArgs
Provides a connector and path at which to find the database schema representation
Service string
The service associated with schema.
Tags []string
Tags to associate with the resource.
Type string
Type of the database schema (repository/script).
changelogScript DbSchemaChangelogScript
Changelog script details
description String
Description of the resource.
identifier Changes to this property will trigger replacement. String
Unique identifier of the resource.
name String
Name of the resource.
orgId Changes to this property will trigger replacement. String
Unique identifier of the organization.
projectId Changes to this property will trigger replacement. String
Unique identifier of the project.
schemaSource DbSchemaSchemaSource
Provides a connector and path at which to find the database schema representation
service String
The service associated with schema.
tags List<String>
Tags to associate with the resource.
type String
Type of the database schema (repository/script).
changelogScript DbSchemaChangelogScript
Changelog script details
description string
Description of the resource.
identifier Changes to this property will trigger replacement. string
Unique identifier of the resource.
name string
Name of the resource.
orgId Changes to this property will trigger replacement. string
Unique identifier of the organization.
projectId Changes to this property will trigger replacement. string
Unique identifier of the project.
schemaSource DbSchemaSchemaSource
Provides a connector and path at which to find the database schema representation
service string
The service associated with schema.
tags string[]
Tags to associate with the resource.
type string
Type of the database schema (repository/script).
changelog_script DbSchemaChangelogScriptArgs
Changelog script details
description str
Description of the resource.
identifier Changes to this property will trigger replacement. str
Unique identifier of the resource.
name str
Name of the resource.
org_id Changes to this property will trigger replacement. str
Unique identifier of the organization.
project_id Changes to this property will trigger replacement. str
Unique identifier of the project.
schema_source DbSchemaSchemaSourceArgs
Provides a connector and path at which to find the database schema representation
service str
The service associated with schema.
tags Sequence[str]
Tags to associate with the resource.
type str
Type of the database schema (repository/script).
changelogScript Property Map
Changelog script details
description String
Description of the resource.
identifier Changes to this property will trigger replacement. String
Unique identifier of the resource.
name String
Name of the resource.
orgId Changes to this property will trigger replacement. String
Unique identifier of the organization.
projectId Changes to this property will trigger replacement. String
Unique identifier of the project.
schemaSource Property Map
Provides a connector and path at which to find the database schema representation
service String
The service associated with schema.
tags List<String>
Tags to associate with the resource.
type String
Type of the database schema (repository/script).

Supporting Types

DbSchemaChangelogScript
, DbSchemaChangelogScriptArgs

Command string
Script to clone changeSets
Image string
The fully-qualified name (FQN) of the image
Location string
Path to changeLog file
Shell string
Type of the shell. For example Sh or Bash
Command string
Script to clone changeSets
Image string
The fully-qualified name (FQN) of the image
Location string
Path to changeLog file
Shell string
Type of the shell. For example Sh or Bash
command String
Script to clone changeSets
image String
The fully-qualified name (FQN) of the image
location String
Path to changeLog file
shell String
Type of the shell. For example Sh or Bash
command string
Script to clone changeSets
image string
The fully-qualified name (FQN) of the image
location string
Path to changeLog file
shell string
Type of the shell. For example Sh or Bash
command str
Script to clone changeSets
image str
The fully-qualified name (FQN) of the image
location str
Path to changeLog file
shell str
Type of the shell. For example Sh or Bash
command String
Script to clone changeSets
image String
The fully-qualified name (FQN) of the image
location String
Path to changeLog file
shell String
Type of the shell. For example Sh or Bash

DbSchemaSchemaSource
, DbSchemaSchemaSourceArgs

Connector This property is required. string
Connector to repository at which to find details about the database schema
Location This property is required. string
The path within the specified repository at which to find details about the database schema
ArchivePath string
If connector type is artifactory, path to the archive file which contains the changeLog
Repo string
If connector url is of account, which repository to connect to using the connector
Connector This property is required. string
Connector to repository at which to find details about the database schema
Location This property is required. string
The path within the specified repository at which to find details about the database schema
ArchivePath string
If connector type is artifactory, path to the archive file which contains the changeLog
Repo string
If connector url is of account, which repository to connect to using the connector
connector This property is required. String
Connector to repository at which to find details about the database schema
location This property is required. String
The path within the specified repository at which to find details about the database schema
archivePath String
If connector type is artifactory, path to the archive file which contains the changeLog
repo String
If connector url is of account, which repository to connect to using the connector
connector This property is required. string
Connector to repository at which to find details about the database schema
location This property is required. string
The path within the specified repository at which to find details about the database schema
archivePath string
If connector type is artifactory, path to the archive file which contains the changeLog
repo string
If connector url is of account, which repository to connect to using the connector
connector This property is required. str
Connector to repository at which to find details about the database schema
location This property is required. str
The path within the specified repository at which to find details about the database schema
archive_path str
If connector type is artifactory, path to the archive file which contains the changeLog
repo str
If connector url is of account, which repository to connect to using the connector
connector This property is required. String
Connector to repository at which to find details about the database schema
location This property is required. String
The path within the specified repository at which to find details about the database schema
archivePath String
If connector type is artifactory, path to the archive file which contains the changeLog
repo String
If connector url is of account, which repository to connect to using the connector

Import

Import project level db schema

$ pulumi import harness:platform/dbSchema:DbSchema example <org_id>/<project_id>/<db_schema_id>
Copy

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.