harness.platform.DbSchema
Explore with Pulumi AI
Resource for creating a Harness DBDevOps Schema.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const test = new harness.platform.DbSchema("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",
},
});
import pulumi
import pulumi_harness as harness
test = harness.platform.DbSchema("test",
identifier="identifier",
org_id="org_id",
project_id="project_id",
name="name",
service="service1",
tags=[
"foo:bar",
"bar:foo",
],
schema_source={
"connector": "gitConnector",
"repo": "TestRepo",
"location": "db/example-changelog.yaml",
})
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.NewDbSchema(ctx, "test", &platform.DbSchemaArgs{
Identifier: pulumi.String("identifier"),
OrgId: pulumi.String("org_id"),
ProjectId: pulumi.String("project_id"),
Name: pulumi.String("name"),
Service: pulumi.String("service1"),
Tags: pulumi.StringArray{
pulumi.String("foo:bar"),
pulumi.String("bar:foo"),
},
SchemaSource: &platform.DbSchemaSchemaSourceArgs{
Connector: pulumi.String("gitConnector"),
Repo: pulumi.String("TestRepo"),
Location: pulumi.String("db/example-changelog.yaml"),
},
})
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.DbSchema("test", new()
{
Identifier = "identifier",
OrgId = "org_id",
ProjectId = "project_id",
Name = "name",
Service = "service1",
Tags = new[]
{
"foo:bar",
"bar:foo",
},
SchemaSource = new Harness.Platform.Inputs.DbSchemaSchemaSourceArgs
{
Connector = "gitConnector",
Repo = "TestRepo",
Location = "db/example-changelog.yaml",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.DbSchema;
import com.pulumi.harness.platform.DbSchemaArgs;
import com.pulumi.harness.platform.inputs.DbSchemaSchemaSourceArgs;
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 DbSchema("test", DbSchemaArgs.builder()
.identifier("identifier")
.orgId("org_id")
.projectId("project_id")
.name("name")
.service("service1")
.tags(
"foo:bar",
"bar:foo")
.schemaSource(DbSchemaSchemaSourceArgs.builder()
.connector("gitConnector")
.repo("TestRepo")
.location("db/example-changelog.yaml")
.build())
.build());
}
}
resources:
test:
type: harness:platform:DbSchema
properties:
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
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,
schema_source: Optional[DbSchemaSchemaSourceArgs] = None,
description: Optional[str] = None,
name: Optional[str] = None,
service: Optional[str] = None,
tags: Optional[Sequence[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",
SchemaSource = new Harness.Platform.Inputs.DbSchemaSchemaSourceArgs
{
Connector = "string",
Location = "string",
Repo = "string",
},
Description = "string",
Name = "string",
Service = "string",
Tags = new[]
{
"string",
},
});
example, err := platform.NewDbSchema(ctx, "dbSchemaResource", &platform.DbSchemaArgs{
Identifier: pulumi.String("string"),
OrgId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
SchemaSource: &platform.DbSchemaSchemaSourceArgs{
Connector: pulumi.String("string"),
Location: pulumi.String("string"),
Repo: pulumi.String("string"),
},
Description: pulumi.String("string"),
Name: pulumi.String("string"),
Service: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
var dbSchemaResource = new DbSchema("dbSchemaResource", DbSchemaArgs.builder()
.identifier("string")
.orgId("string")
.projectId("string")
.schemaSource(DbSchemaSchemaSourceArgs.builder()
.connector("string")
.location("string")
.repo("string")
.build())
.description("string")
.name("string")
.service("string")
.tags("string")
.build());
db_schema_resource = harness.platform.DbSchema("dbSchemaResource",
identifier="string",
org_id="string",
project_id="string",
schema_source=harness.platform.DbSchemaSchemaSourceArgs(
connector="string",
location="string",
repo="string",
),
description="string",
name="string",
service="string",
tags=["string"])
const dbSchemaResource = new harness.platform.DbSchema("dbSchemaResource", {
identifier: "string",
orgId: "string",
projectId: "string",
schemaSource: {
connector: "string",
location: "string",
repo: "string",
},
description: "string",
name: "string",
service: "string",
tags: ["string"],
});
type: harness:platform:DbSchema
properties:
description: string
identifier: string
name: string
orgId: string
projectId: string
schemaSource:
connector: string
location: string
repo: string
service: string
tags:
- 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
The DbSchema resource accepts the following input properties:
- Identifier string
- Unique identifier of the resource.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- Schema
Source DbSchema Schema Source - Provides a connector and path at which to find the database schema representation
- Description string
- Description of the resource.
- Name string
- Name of the resource.
- Service string
- The service associated with schema
- List<string>
- Tags to associate with the resource.
- Identifier string
- Unique identifier of the resource.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- Schema
Source DbSchema Schema Source Args - Provides a connector and path at which to find the database schema representation
- Description string
- Description of the resource.
- Name string
- Name of the resource.
- Service string
- The service associated with schema
- []string
- Tags to associate with the resource.
- identifier String
- Unique identifier of the resource.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- schema
Source DbSchema Schema Source - Provides a connector and path at which to find the database schema representation
- description String
- Description of the resource.
- name String
- Name of the resource.
- service String
- The service associated with schema
- List<String>
- Tags to associate with the resource.
- identifier string
- Unique identifier of the resource.
- org
Id string - Unique identifier of the organization.
- project
Id string - Unique identifier of the project.
- schema
Source DbSchema Schema Source - Provides a connector and path at which to find the database schema representation
- description string
- Description of the resource.
- name string
- Name of the resource.
- service string
- The service associated with schema
- string[]
- Tags to associate with the 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_
source DbSchema Schema Source Args - Provides a connector and path at which to find the database schema representation
- description str
- Description of the resource.
- name str
- Name of the resource.
- service str
- The service associated with schema
- Sequence[str]
- Tags to associate with the resource.
- identifier String
- Unique identifier of the resource.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- schema
Source Property Map - Provides a connector and path at which to find the database schema representation
- description String
- Description of the resource.
- name String
- Name of the resource.
- service String
- The service associated with schema
- List<String>
- Tags to associate with the resource.
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,
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) -> 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)
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.
- 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
Source 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.
- 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
Source 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.
- 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
Source 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.
- 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
Source 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.
- 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.
- 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
Source 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.
Supporting Types
DbSchemaSchemaSource, DbSchemaSchemaSourceArgs
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
harness
Terraform Provider.