-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: support database catalog (#83)
* chore: support set roles for user in workspace level * fix: lint * fix: test * chore: support group * fix: test * fix: test * chore: update examples * chore: support database catalog * fix: lint
- Loading branch information
Showing
40 changed files
with
783 additions
and
403 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 |
---|---|---|
@@ -1 +1 @@ | ||
1.0.5 | ||
1.0.6 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "bytebase_database_catalog Data Source - terraform-provider-bytebase" | ||
subcategory: "" | ||
description: |- | ||
The database catalog data source. | ||
--- | ||
|
||
# bytebase_database_catalog (Data Source) | ||
|
||
The database catalog data source. | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `database` (String) The database full name in instances/{instance}/databases/{database} format | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
- `schemas` (List of Object) (see [below for nested schema](#nestedatt--schemas)) | ||
|
||
<a id="nestedatt--schemas"></a> | ||
### Nested Schema for `schemas` | ||
|
||
Read-Only: | ||
|
||
- `name` (String) | ||
- `tables` (List of Object) (see [below for nested schema](#nestedobjatt--schemas--tables)) | ||
|
||
<a id="nestedobjatt--schemas--tables"></a> | ||
### Nested Schema for `schemas.tables` | ||
|
||
Read-Only: | ||
|
||
- `classification` (String) | ||
- `columns` (List of Object) (see [below for nested schema](#nestedobjatt--schemas--tables--columns)) | ||
- `name` (String) | ||
|
||
<a id="nestedobjatt--schemas--tables--columns"></a> | ||
### Nested Schema for `schemas.tables.columns` | ||
|
||
Read-Only: | ||
|
||
- `classification` (String) | ||
- `labels` (Map of String) | ||
- `name` (String) | ||
- `semantic_type` (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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "bytebase_database_catalog Resource - terraform-provider-bytebase" | ||
subcategory: "" | ||
description: |- | ||
The database catalog resource. | ||
--- | ||
|
||
# bytebase_database_catalog (Resource) | ||
|
||
The database catalog resource. | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `database` (String) The database full name in instances/{instance}/databases/{database} format | ||
- `schemas` (Block List, Min: 1) (see [below for nested schema](#nestedblock--schemas)) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
|
||
<a id="nestedblock--schemas"></a> | ||
### Nested Schema for `schemas` | ||
|
||
Required: | ||
|
||
- `tables` (Block List, Min: 1) (see [below for nested schema](#nestedblock--schemas--tables)) | ||
|
||
Optional: | ||
|
||
- `name` (String) | ||
|
||
<a id="nestedblock--schemas--tables"></a> | ||
### Nested Schema for `schemas.tables` | ||
|
||
Required: | ||
|
||
- `columns` (Block List, Min: 1) (see [below for nested schema](#nestedblock--schemas--tables--columns)) | ||
- `name` (String) | ||
|
||
Optional: | ||
|
||
- `classification` (String) The classification id | ||
|
||
<a id="nestedblock--schemas--tables--columns"></a> | ||
### Nested Schema for `schemas.tables.columns` | ||
|
||
Required: | ||
|
||
- `name` (String) | ||
|
||
Optional: | ||
|
||
- `classification` (String) The classification id | ||
- `labels` (Map of String) | ||
- `semantic_type` (String) The semantic type 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Examples for query the environments | ||
terraform { | ||
required_providers { | ||
bytebase = { | ||
version = "1.0.6" | ||
# For local development, please use "terraform.local/bytebase/bytebase" instead | ||
source = "registry.terraform.io/bytebase/bytebase" | ||
} | ||
} | ||
} | ||
|
||
provider "bytebase" { | ||
# You need to replace the account and key with your Bytebase service account. | ||
service_account = "[email protected]" | ||
service_key = "bbs_BxVIp7uQsARl8nR92ZZV" | ||
# The Bytebase service URL. You can use the external URL in production. | ||
# Check the docs about external URL: https://www.bytebase.com/docs/get-started/install/external-url | ||
url = "https://bytebase.example.com" | ||
} | ||
|
||
|
||
|
||
data "bytebase_database_catalog" "employee" { | ||
database = "instances/test-sample-instance/databases/employee" | ||
} | ||
|
||
output "employee_catalog" { | ||
value = data.bytebase_database_catalog.employee | ||
} |
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.