Skip to content

Commit 9651ce0

Browse files
committed
chore: update for Bytebase 3.11 compatibility
1 parent 8a8d10a commit 9651ce0

File tree

18 files changed

+36
-142
lines changed

18 files changed

+36
-142
lines changed

docs/data-sources/iam_policy.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ Optional:
5050

5151
- `database` (String) The accessible database full name in instances/{instance resource id}/databases/{database name} format
5252
- `expire_timestamp` (String) The expiration timestamp in YYYY-MM-DDThh:mm:ssZ format
53-
- `row_limit` (Number) The export row limit for exporter role
5453
- `schema` (String) The accessible schema in the database
5554
- `tables` (Set of String) The accessible table list
5655

docs/data-sources/policy.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ The policy data source.
2323
### Optional
2424

2525
- `data_source_query_policy` (Block List, Max: 1) Restrict querying admin data sources (see [below for nested schema](#nestedblock--data_source_query_policy))
26-
- `disable_copy_data_policy` (Block List, Max: 1) Restrict data copying in SQL Editor (Admins/DBAs allowed) (see [below for nested schema](#nestedblock--disable_copy_data_policy))
2726
- `global_masking_policy` (Block List, Max: 1) (see [below for nested schema](#nestedblock--global_masking_policy))
2827
- `masking_exception_policy` (Block List, Max: 1) (see [below for nested schema](#nestedblock--masking_exception_policy))
2928
- `query_data_policy` (Block List, Max: 1) The policy for query data (see [below for nested schema](#nestedblock--query_data_policy))
@@ -46,14 +45,6 @@ Optional:
4645
- `restriction` (String) RESTRICTION_UNSPECIFIED means no restriction; FALLBACK will allows to query admin data sources when there is no read-only data source; DISALLOW will always disallow to query admin data sources.
4746

4847

49-
<a id="nestedblock--disable_copy_data_policy"></a>
50-
### Nested Schema for `disable_copy_data_policy`
51-
52-
Required:
53-
54-
- `enable` (Boolean) Restrict data copying
55-
56-
5748
<a id="nestedblock--global_masking_policy"></a>
5849
### Nested Schema for `global_masking_policy`
5950

@@ -108,6 +99,7 @@ Optional:
10899

109100
Required:
110101

102+
- `disable_copy_data` (Boolean) Disable copying data in the SQL editor
111103
- `disable_export` (Boolean) Disable export data in the SQL editor
112104

113105
Optional:

docs/data-sources/policy_list.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ The policy data source list.
3030
Read-Only:
3131

3232
- `data_source_query_policy` (List of Object) (see [below for nested schema](#nestedobjatt--policies--data_source_query_policy))
33-
- `disable_copy_data_policy` (List of Object) (see [below for nested schema](#nestedobjatt--policies--disable_copy_data_policy))
3433
- `enforce` (Boolean)
3534
- `global_masking_policy` (List of Object) (see [below for nested schema](#nestedobjatt--policies--global_masking_policy))
3635
- `inherit_from_parent` (Boolean)
@@ -50,14 +49,6 @@ Read-Only:
5049
- `restriction` (String)
5150

5251

53-
<a id="nestedobjatt--policies--disable_copy_data_policy"></a>
54-
### Nested Schema for `policies.disable_copy_data_policy`
55-
56-
Read-Only:
57-
58-
- `enable` (Boolean)
59-
60-
6152
<a id="nestedobjatt--policies--global_masking_policy"></a>
6253
### Nested Schema for `policies.global_masking_policy`
6354

@@ -106,6 +97,7 @@ Read-Only:
10697

10798
Read-Only:
10899

100+
- `disable_copy_data` (Boolean)
109101
- `disable_export` (Boolean)
110102
- `maximum_result_rows` (Number)
111103
- `maximum_result_size` (Number)

docs/resources/iam_policy.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ Optional:
5050

5151
- `database` (String) The accessible database full name in instances/{instance resource id}/databases/{database name} format
5252
- `expire_timestamp` (String) The expiration timestamp in YYYY-MM-DDThh:mm:ssZ format
53-
- `row_limit` (Number) The export row limit for exporter role
5453
- `schema` (String) The accessible schema in the database
5554
- `tables` (Set of String) The accessible table list
5655

docs/resources/policy.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ The policy resource.
2323
### Optional
2424

2525
- `data_source_query_policy` (Block List, Max: 1) Restrict querying admin data sources (see [below for nested schema](#nestedblock--data_source_query_policy))
26-
- `disable_copy_data_policy` (Block List, Max: 1) Restrict data copying in SQL Editor (Admins/DBAs allowed) (see [below for nested schema](#nestedblock--disable_copy_data_policy))
2726
- `enforce` (Boolean) Decide if the policy is enforced.
2827
- `global_masking_policy` (Block List, Max: 1) (see [below for nested schema](#nestedblock--global_masking_policy))
2928
- `inherit_from_parent` (Boolean) Decide if the policy should inherit from the parent.
@@ -46,14 +45,6 @@ Optional:
4645
- `restriction` (String) RESTRICTION_UNSPECIFIED means no restriction; FALLBACK will allows to query admin data sources when there is no read-only data source; DISALLOW will always disallow to query admin data sources.
4746

4847

49-
<a id="nestedblock--disable_copy_data_policy"></a>
50-
### Nested Schema for `disable_copy_data_policy`
51-
52-
Required:
53-
54-
- `enable` (Boolean) Restrict data copying
55-
56-
5748
<a id="nestedblock--global_masking_policy"></a>
5849
### Nested Schema for `global_masking_policy`
5950

@@ -108,6 +99,7 @@ Optional:
10899

109100
Required:
110101

102+
- `disable_copy_data` (Boolean) Disable copying data in the SQL editor
111103
- `disable_export` (Boolean) Disable export data in the SQL editor
112104

113105
Optional:

examples/database_group/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ resource "bytebase_database_group" "databases_in_test" {
3636
resource_id = "databases-in-test"
3737
project = data.bytebase_project.sample_project.name
3838
title = "Databases in test env"
39-
condition = "resource.environment_name == \"test\""
39+
condition = "resource.environment_id == \"test\""
4040
}
4141

4242
data "bytebase_database_group" "databases_in_test" {

examples/setup/database_group.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ resource "bytebase_database_group" "databases_in_test" {
44
resource_id = "databases-in-test"
55
project = bytebase_project.sample_project.name
66
title = "Databases in test env"
7-
condition = "resource.environment_name == \"test\""
7+
condition = "resource.environment_id == \"test\""
88
}

examples/setup/environment.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ resource "bytebase_policy" "rollout_policy" {
5151
}
5252
}
5353

54-
resource "bytebase_policy" "disable_copy_data_policy" {
54+
resource "bytebase_policy" "env_query_data_policy" {
5555
depends_on = [bytebase_setting.environments]
5656
parent = bytebase_setting.environments.environment_setting[0].environment[0].name
57-
type = "DISABLE_COPY_DATA"
57+
type = "DATA_QUERY"
5858

59-
disable_copy_data_policy {
60-
enable = false
59+
query_data_policy {
60+
disable_copy_data = true
6161
}
6262
}
6363

examples/setup/iam.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ resource "bytebase_iam_policy" "project_iam" {
8080
condition {
8181
database = "instances/test-sample-instance/databases/employee"
8282
tables = ["dept_emp", "dept_manager"]
83-
row_limit = 10000
8483
expire_timestamp = "2027-03-09T16:17:49Z"
8584
}
8685
}

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ go 1.24.4
55
toolchain go1.24.5
66

77
require (
8-
buf.build/gen/go/bytebase/bytebase/connectrpc/go v1.18.1-20250908030532-58bfc338601e.1
9-
buf.build/gen/go/bytebase/bytebase/protocolbuffers/go v1.36.8-20250908030532-58bfc338601e.1
10-
connectrpc.com/connect v1.18.1
8+
buf.build/gen/go/bytebase/bytebase/connectrpc/go v1.19.1-20251010010834-1aa0c6de76e4.1
9+
buf.build/gen/go/bytebase/bytebase/protocolbuffers/go v1.36.10-20251010010834-1aa0c6de76e4.1
10+
connectrpc.com/connect v1.19.1
1111
github.com/hashicorp/go-cty v1.5.0
1212
github.com/hashicorp/terraform-plugin-docs v0.13.0
1313
github.com/hashicorp/terraform-plugin-log v0.9.0
1414
github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0
1515
github.com/pkg/errors v0.9.1
1616
google.golang.org/genproto v0.0.0-20250528174236-200df99c418a
1717
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822
18-
google.golang.org/protobuf v1.36.8
18+
google.golang.org/protobuf v1.36.10
1919
)
2020

2121
require (

0 commit comments

Comments
 (0)