generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat]: [DBOPS-306]: Onboard DBDevOps schema entity (#998)
* [feat]: [DBOPS-306]: Onboard DBDevOps schema entity * test fix * update optional fields data source * update optional field data source * add documentation * update harness-go-sdk version * add to changelog * add data source example * Address documentation comments * update documentation * address PR comments
- Loading branch information
1 parent
9dfaa1e
commit 09b1568
Showing
17 changed files
with
701 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:new-resource | ||
harness_platform_db_schema | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "harness_platform_db_schema Data Source - terraform-provider-harness" | ||
subcategory: "Next Gen" | ||
description: |- | ||
Data source for retrieving a Harness DBDevOps Schema. | ||
--- | ||
|
||
# harness_platform_db_schema (Data Source) | ||
|
||
Data source for retrieving a Harness DBDevOps Schema. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "harness_platform_db_schema" "example" { | ||
identifier = "identifier" | ||
org_id = "org_id" | ||
project_id = "project_id" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `identifier` (String) Unique identifier of the resource. | ||
- `org_id` (String) Unique identifier of the organization. | ||
- `project_id` (String) Unique identifier of the project. | ||
|
||
### Optional | ||
|
||
- `name` (String) Name of the resource. | ||
|
||
### Read-Only | ||
|
||
- `description` (String) Description of the resource. | ||
- `id` (String) The ID of this resource. | ||
- `schema_source` (List of Object) Provides a connector and path at which to find the database schema representation (see [below for nested schema](#nestedatt--schema_source)) | ||
- `service` (String) The service associated with schema | ||
- `tags` (Set of String) Tags to associate with the resource. | ||
|
||
<a id="nestedatt--schema_source"></a> | ||
### Nested Schema for `schema_source` | ||
|
||
Read-Only: | ||
|
||
- `connector` (String) | ||
- `location` (String) | ||
- `repo` (String) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "harness_platform_db_schema Resource - terraform-provider-harness" | ||
subcategory: "Next Gen" | ||
description: |- | ||
Resource for creating a Harness DBDevOps Schema. | ||
--- | ||
|
||
# harness_platform_db_schema (Resource) | ||
|
||
Resource for creating a Harness DBDevOps Schema. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "harness_platform_db_schema" "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" | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `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` (Block List, Min: 1, Max: 1) Provides a connector and path at which to find the database schema representation (see [below for nested schema](#nestedblock--schema_source)) | ||
|
||
### Optional | ||
|
||
- `description` (String) Description of the resource. | ||
- `service` (String) The service associated with schema | ||
- `tags` (Set of String) Tags to associate with the resource. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
|
||
<a id="nestedblock--schema_source"></a> | ||
### Nested Schema for `schema_source` | ||
|
||
Required: | ||
|
||
- `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 | ||
|
||
Optional: | ||
|
||
- `repo` (String) If connector url is of account, which repository to connect to using the connector | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
# Import project level db schema | ||
terraform import harness_platform_db_schema.example <org_id>/<project_id>/<db_schema_id> | ||
``` |
5 changes: 5 additions & 0 deletions
5
examples/data-sources/harness_platform_db_schema/data-source.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
data "harness_platform_db_schema" "example" { | ||
identifier = "identifier" | ||
org_id = "org_id" | ||
project_id = "project_id" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Import project level db schema | ||
terraform import harness_platform_db_schema.example <org_id>/<project_id>/<db_schema_id> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
resource "harness_platform_db_schema" "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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.