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 string
- The unique name of the resource.
- args DbSchemaArgs
- 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 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 string
- The unique name of the resource.
- args DbSchemaArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DbSchemaArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
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());
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")
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",
});
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
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 string
- Unique identifier of the resource.
- OrgId string
- Unique identifier of the organization.
- ProjectId string
- Unique identifier of the project.
- ChangelogScript DbSchema Changelog Script 
- Changelog script details
- Description string
- Description of the resource.
- Name string
- Name of the resource.
- SchemaSource DbSchema Schema Source 
- Provides a connector and path at which to find the database schema representation
- Service string
- The service associated with schema.
- List<string>
- Tags to associate with the resource.
- Type string
- Type of the database schema (repository/script).
- Identifier string
- Unique identifier of the resource.
- OrgId string
- Unique identifier of the organization.
- ProjectId string
- Unique identifier of the project.
- ChangelogScript DbSchema Changelog Script Args 
- Changelog script details
- Description string
- Description of the resource.
- Name string
- Name of the resource.
- SchemaSource DbSchema Schema Source Args 
- Provides a connector and path at which to find the database schema representation
- Service string
- The service associated with schema.
- []string
- Tags to associate with the resource.
- Type string
- Type of the database schema (repository/script).
- identifier String
- Unique identifier of the resource.
- orgId String
- Unique identifier of the organization.
- projectId String
- Unique identifier of the project.
- changelogScript DbSchema Changelog Script 
- Changelog script details
- description String
- Description of the resource.
- name String
- Name of the resource.
- schemaSource DbSchema Schema Source 
- Provides a connector and path at which to find the database schema representation
- service String
- The service associated with schema.
- List<String>
- Tags to associate with the resource.
- type String
- Type of the database schema (repository/script).
- identifier string
- Unique identifier of the resource.
- orgId string
- Unique identifier of the organization.
- projectId string
- Unique identifier of the project.
- changelogScript DbSchema Changelog Script 
- Changelog script details
- description string
- Description of the resource.
- name string
- Name of the resource.
- schemaSource DbSchema Schema Source 
- Provides a connector and path at which to find the database schema representation
- service string
- The service associated with schema.
- string[]
- Tags to associate with the resource.
- type string
- Type of the database schema (repository/script).
- identifier str
- Unique identifier of the resource.
- org_id str
- Unique identifier of the organization.
- project_id str
- Unique identifier of the project.
- changelog_script DbSchema Changelog Script Args 
- Changelog script details
- description str
- Description of the resource.
- name str
- Name of the resource.
- schema_source DbSchema Schema Source Args 
- Provides a connector and path at which to find the database schema representation
- service str
- The service associated with schema.
- Sequence[str]
- Tags to associate with the resource.
- type str
- Type of the database schema (repository/script).
- identifier String
- Unique identifier of the resource.
- orgId String
- Unique identifier of the organization.
- projectId 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.
- 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) -> DbSchemafunc 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
- 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.
- ChangelogScript DbSchema Changelog Script 
- Changelog script details
- Description string
- Description of the resource.
- Identifier string
- Unique identifier of the resource.
- Name string
- Name of the resource.
- OrgId string
- Unique identifier of the organization.
- ProjectId string
- Unique identifier of the project.
- SchemaSource DbSchema Schema Source 
- Provides a connector and path at which to find the database schema representation
- Service string
- The service associated with schema.
- List<string>
- Tags to associate with the resource.
- Type string
- Type of the database schema (repository/script).
- ChangelogScript DbSchema Changelog Script Args 
- Changelog script details
- Description string
- Description of the resource.
- Identifier string
- Unique identifier of the resource.
- Name string
- Name of the resource.
- OrgId string
- Unique identifier of the organization.
- ProjectId string
- Unique identifier of the project.
- SchemaSource DbSchema Schema Source Args 
- Provides a connector and path at which to find the database schema representation
- Service string
- The service associated with schema.
- []string
- Tags to associate with the resource.
- Type string
- Type of the database schema (repository/script).
- changelogScript DbSchema Changelog Script 
- Changelog script details
- description String
- Description of the resource.
- identifier String
- Unique identifier of the resource.
- name String
- Name of the resource.
- orgId String
- Unique identifier of the organization.
- projectId String
- Unique identifier of the project.
- schemaSource DbSchema Schema Source 
- Provides a connector and path at which to find the database schema representation
- service String
- The service associated with schema.
- List<String>
- Tags to associate with the resource.
- type String
- Type of the database schema (repository/script).
- changelogScript DbSchema Changelog Script 
- Changelog script details
- description string
- Description of the resource.
- identifier string
- Unique identifier of the resource.
- name string
- Name of the resource.
- orgId string
- Unique identifier of the organization.
- projectId string
- Unique identifier of the project.
- schemaSource DbSchema Schema Source 
- Provides a connector and path at which to find the database schema representation
- service string
- The service associated with schema.
- string[]
- Tags to associate with the resource.
- type string
- Type of the database schema (repository/script).
- changelog_script DbSchema Changelog Script Args 
- Changelog script details
- 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_source DbSchema Schema Source Args 
- Provides a connector and path at which to find the database schema representation
- service str
- The service associated with schema.
- 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 String
- Unique identifier of the resource.
- name String
- Name of the resource.
- orgId String
- Unique identifier of the organization.
- projectId 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.
- List<String>
- Tags to associate with the resource.
- type String
- Type of the database schema (repository/script).
Supporting Types
DbSchemaChangelogScript, DbSchemaChangelogScriptArgs        
DbSchemaSchemaSource, DbSchemaSchemaSourceArgs        
- Connector string
- Connector to repository at which to find details about the database schema
- Location 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 string
- Connector to repository at which to find details about the database schema
- Location 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 String
- Connector to repository at which to find details about the database schema
- location 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 string
- Connector to repository at which to find details about the database schema
- location 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 str
- Connector to repository at which to find details about the database schema
- location 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 String
- Connector to repository at which to find details about the database schema
- location 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>
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 harnessTerraform Provider.
