import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Resource for creating a Harness DBDevOps Schema. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as harness from "@pulumi/harness"; * * const defaultTypeTest = new harness.platform.DbSchema("default_type_test", { * identifier: "identifier", * orgId: "org_id", * projectId: "project_id", * name: "name", * service: "service1", * tags: [ * "foo:bar", * "bar:foo", * ], * schemaSource: { * connector: "gitConnector", * repo: "TestRepo", * location: "db/example-changelog.yaml", * archivePath: "path/to/archive.zip", * }, * }); * const liquibaseRepositoryTest = new harness.platform.DbSchema("liquibase_repository_test", { * identifier: "identifier", * orgId: "org_id", * projectId: "project_id", * name: "name", * service: "service1", * type: "Repository", * migrationType: "Liquibase", * tags: [ * "foo:bar", * "bar:foo", * ], * schemaSource: { * connector: "gitConnector", * repo: "TestRepo", * location: "db/example-changelog.yaml", * archivePath: "path/to/archive.zip", * }, * }); * const liquibaseScriptTest = new harness.platform.DbSchema("liquibase_script_test", { * identifier: "identifier", * orgId: "org_id", * projectId: "project_id", * name: "name", * migrationType: "Liquibase", * service: "service1", * type: "Script", * tags: [ * "foo:bar", * "bar:foo", * ], * changelogScript: { * image: "plugins/image", * command: "echo \\\"hello dbops\\\"", * shell: "sh/bash", * location: "db/example-changelog.yaml", * }, * }); * const flywayRepositoryTest = new harness.platform.DbSchema("flyway_repository_test", { * identifier: "identifier", * orgId: "org_id", * projectId: "project_id", * name: "name", * service: "service1", * type: "Repository", * migrationType: "Flyway", * tags: [ * "foo:bar", * "bar:foo", * ], * schemaSource: { * connector: "gitConnector", * repo: "TestRepo", * location: "db/flyway/migrations", * toml: "db/flyway.toml", * archivePath: "path/to/archive.zip", * }, * }); * const flywayScriptTest = new harness.platform.DbSchema("flyway_script_test", { * identifier: "identifier", * orgId: "org_id", * projectId: "project_id", * name: "name", * migrationType: "Flyway", * service: "service1", * type: "Script", * tags: [ * "foo:bar", * "bar:foo", * ], * changelogScript: { * image: "plugins/image", * command: "echo \\\"hello dbops\\\"", * shell: "sh/bash", * location: "db/flyway/migrations", * toml: "db/flyway.toml", * }, * }); * const perconaEnabledTest = new harness.platform.DbSchema("percona_enabled_test", { * identifier: "identifier", * orgId: "org_id", * projectId: "project_id", * name: "name", * service: "service1", * type: "Repository", * migrationType: "Liquibase", * usePercona: true, * tags: [ * "foo:bar", * "bar:foo", * ], * schemaSource: { * connector: "gitConnector", * repo: "TestRepo", * location: "db/example-changelog.yaml", * archivePath: "path/to/archive.zip", * }, * }); * const harnessCodeRepo = new harness.platform.DbSchema("harness_code_repo", { * identifier: "identifier", * orgId: "org_id", * projectId: "project_id", * name: "name", * service: "service1", * type: "Repository", * tags: [ * "foo:bar", * "bar:foo", * ], * schemaSource: { * repo: "my-harness-code-repo", * location: "db/example-changelog.yaml", * }, * }); * ``` * * ## Import * * The `pulumi import` command can be used, for example: * * Import project level db schema * * ```sh * $ pulumi import harness:platform/dbSchema:DbSchema example // * ``` */ export declare class DbSchema extends pulumi.CustomResource { /** * Get an existing DbSchema resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: DbSchemaState, opts?: pulumi.CustomResourceOptions): DbSchema; /** * Returns true if the given object is an instance of DbSchema. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is DbSchema; /** * Configuration to clone changeSets using script */ readonly changelogScript: pulumi.Output; /** * Description of the resource. */ readonly description: pulumi.Output; /** * Unique identifier of the resource. */ readonly identifier: pulumi.Output; /** * DB Migration tool type. Valid values are: Liquibase, Flyway */ readonly migrationType: pulumi.Output; /** * Name of the resource. */ readonly name: pulumi.Output; /** * Unique identifier of the organization. */ readonly orgId: pulumi.Output; /** * Unique identifier of the project. */ readonly projectId: pulumi.Output; /** * Provides a connector and path at which to find the database schema representation. For Harness Code Repository, omit the connector and provide repo directly. */ readonly schemaSource: pulumi.Output; /** * The service associated with schema */ readonly service: pulumi.Output; /** * Tags to associate with the resource. */ readonly tags: pulumi.Output; /** * Type of the database schema. Valid values are: SCRIPT, REPOSITORY */ readonly type: pulumi.Output; /** * If percona-toolkit is to be enabled for the database schema. Defaults to `false`. */ readonly usePercona: pulumi.Output; /** * Create a DbSchema resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: DbSchemaArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DbSchema resources. */ export interface DbSchemaState { /** * Configuration to clone changeSets using script */ changelogScript?: pulumi.Input; /** * Description of the resource. */ description?: pulumi.Input; /** * Unique identifier of the resource. */ identifier?: pulumi.Input; /** * DB Migration tool type. Valid values are: Liquibase, Flyway */ migrationType?: pulumi.Input; /** * Name of the resource. */ name?: pulumi.Input; /** * Unique identifier of the organization. */ orgId?: pulumi.Input; /** * Unique identifier of the project. */ projectId?: pulumi.Input; /** * Provides a connector and path at which to find the database schema representation. For Harness Code Repository, omit the connector and provide repo directly. */ schemaSource?: pulumi.Input; /** * The service associated with schema */ service?: pulumi.Input; /** * Tags to associate with the resource. */ tags?: pulumi.Input[] | undefined>; /** * Type of the database schema. Valid values are: SCRIPT, REPOSITORY */ type?: pulumi.Input; /** * If percona-toolkit is to be enabled for the database schema. Defaults to `false`. */ usePercona?: pulumi.Input; } /** * The set of arguments for constructing a DbSchema resource. */ export interface DbSchemaArgs { /** * Configuration to clone changeSets using script */ changelogScript?: pulumi.Input; /** * Description of the resource. */ description?: pulumi.Input; /** * Unique identifier of the resource. */ identifier: pulumi.Input; /** * DB Migration tool type. Valid values are: Liquibase, Flyway */ migrationType?: pulumi.Input; /** * Name of the resource. */ name?: pulumi.Input; /** * Unique identifier of the organization. */ orgId: pulumi.Input; /** * Unique identifier of the project. */ projectId: pulumi.Input; /** * Provides a connector and path at which to find the database schema representation. For Harness Code Repository, omit the connector and provide repo directly. */ schemaSource?: pulumi.Input; /** * The service associated with schema */ service?: pulumi.Input; /** * Tags to associate with the resource. */ tags?: pulumi.Input[] | undefined>; /** * Type of the database schema. Valid values are: SCRIPT, REPOSITORY */ type?: pulumi.Input; /** * If percona-toolkit is to be enabled for the database schema. Defaults to `false`. */ usePercona?: pulumi.Input; } //# sourceMappingURL=dbSchema.d.ts.map