You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/data-sources/environment.md
+8-22Lines changed: 8 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,36 +8,22 @@ description: |-
8
8
9
9
# bytebase_environment (Data Source)
10
10
11
-
The environment data source. You can get a single environment through `bytebase_environment` data source.
11
+
The environment data source.
12
12
13
-
## Example Usage
14
13
15
-
```terraform
16
-
# Get environment by resource id
17
-
data "bytebase_environment" "dev" {
18
-
resource_id = "dev"
19
-
}
20
-
21
-
output "env" {
22
-
value = data.bytebase_environment.dev
23
-
}
24
-
```
25
-
26
-
You can check [examples](https://github.com/bytebase/terraform-provider-bytebase/blob/main/examples/environments) for more usage examples.
27
14
28
15
<!-- schema generated by tfplugindocs -->
29
-
30
16
## Schema
31
17
32
18
### Required
33
19
34
-
-`resource_id` (String) The environment **unique resource id**.
20
+
-`resource_id` (String) The environment unique resource id.
35
21
36
22
### Read-Only
37
23
38
-
-`id` (Number) The ID of this resource.
39
-
-`title` (String) The environment **unique** name.
40
-
-`order` (Number) The environment sorting order. Starting with 1. Lower number appears first in the deployment pipeline.
41
-
-`environment_tier_policy` (String) Check [Environment Tier](https://www.bytebase.com/docs/administration/environment-policy/tier) for details. Should be one of:
42
-
-`PROTECTED`
43
-
-`UNPROTECTED`
24
+
-`environment_tier_policy` (String) If marked as PROTECTED, developers cannot execute any query on this environment's databases using SQL Editor by default.
Copy file name to clipboardExpand all lines: docs/data-sources/instance.md
+17-43Lines changed: 17 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,62 +8,36 @@ description: |-
8
8
9
9
# bytebase_instance (Data Source)
10
10
11
-
The instance data source. You can get a single instance through `bytebase_instance` data source.
11
+
The instance data source.
12
12
13
-
## Example Usage
14
13
15
-
```terraform
16
-
# Find a instance by resource id "dev-instance" in the "dev" environment.
17
-
data "bytebase_instance" "dev" {
18
-
resource_id = "dev-instance"
19
-
}
20
-
21
-
output "instance" {
22
-
value = data.bytebase_instance.dev
23
-
}
24
-
```
25
-
26
-
You can check [examples](https://github.com/bytebase/terraform-provider-bytebase/blob/main/examples/instances) for more usage examples.
27
14
28
15
<!-- schema generated by tfplugindocs -->
29
-
30
16
## Schema
31
17
32
18
### Required
33
19
34
-
-`resource_id` (String) The instance **unique resource id**.
20
+
-`resource_id` (String) The instance unique resource id.
35
21
36
22
### Read-Only
37
23
38
-
-`id` (Number) The instance id.
39
-
-`title` (String) The instance name.
40
-
-`engine` (String) The instance engine. Should be one of:
41
-
-`MYSQL`
42
-
-`POSTGRES`
43
-
-`TIDB`
44
-
-`SNOWFLAKE`
45
-
-`CLICKHOUSE`
46
-
-`SQLITE`
47
-
-`MONGODB`
24
+
-`data_sources` (List of Object) (see [below for nested schema](#nestedatt--data_sources))
25
+
-`engine` (String) The instance engine. Support MYSQL, POSTGRES, TIDB, SNOWFLAKE, CLICKHOUSE, MONGODB, SQLITE, REDIS, ORACLE, SPANNER, MSSQL, REDSHIFT, MARIADB, OCEANBASE.
26
+
-`environment` (String) The environment name for your instance in "environments/{resource id}" format.
48
27
-`external_link` (String) The external console URL managing this instance (e.g. AWS RDS console, your in-house DB instance console)
49
-
-`data_sources` (List of Object) The connection for the instance. You can configure read-only or admin connection account here. (see [below for nested schema](#nestedblock--data_sources))
50
-
-`environment` (String) The environment **unique resource id** for the instance.
51
-
52
-
<aid="nestedblock--data_sources"></a>
28
+
-`id` (String) The ID of this resource.
29
+
-`title` (String) The instance title.
53
30
31
+
<aid="nestedatt--data_sources"></a>
54
32
### Nested Schema for `data_sources`
55
33
56
-
#### Read-Only
34
+
Read-Only:
35
+
36
+
-`database` (String)
37
+
-`host` (String)
38
+
-`port` (String)
39
+
-`title` (String)
40
+
-`type` (String)
41
+
-`username` (String)
42
+
57
43
58
-
-`title` (String) The unique data source name in this instance.
59
-
-`type` (String) The data source type. Should be one of:
60
-
-`ADMIN`: The ADMIN type of data source.
61
-
-`READ_ONLY`: The read-only type of data source.
62
-
-`username` (String) The connection user name used by Bytebase to perform DDL and DML operations.
63
-
-`password` (String) The connection user password used by Bytebase to perform DDL and DML operations.
64
-
-`ssl_ca` (String) The CA certificate. Optional, you can set this if the engine type is `CLICKHOUSE`.
65
-
-`ssl_cert` (String) The client certificate. Optional, you can set this if the engine type is `CLICKHOUSE`.
66
-
-`ssl_key` (String) The client key. Optional, you can set this if the engine type is `CLICKHOUSE`.
67
-
-`host` (String) Host or socket for the data source, or the account name if the instance type is Snowflake.
68
-
-`port` (String) The port for the data source.
69
-
-`database` (String) The database for the data source.
0 commit comments