Skip to content

Commit 5b0bca5

Browse files
authored
Avoid wildcard table (#294)
1 parent 08752bd commit 5b0bca5

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

pkg/resource/descriptions/grant_privilege.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
You can use the `clickhouse_grant_privilege` resource to grant privileges on databases and tables to either a `clickhouse_user` or a `clickhouse_role`.
44

5+
Please note that in order to grant privileges to all database and/or all tables, the `database` and/or `table` fields must be set to null, and not to "*".
6+
57
Attention: in order to use the `clickhouse_grant_privilege` resource you need to set the `query_api_endpoint` attribute in the `clickhouse_service`.
68
Please check [full example](https://github.com/ClickHouse/terraform-provider-clickhouse/blob/main/examples/rbac/main.tf).
79

pkg/resource/grant_privilege.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ func (r *GrantPrivilegeResource) Schema(_ context.Context, _ resource.SchemaRequ
108108
},
109109
Validators: []validator.String{
110110
stringvalidator.LengthAtLeast(1),
111+
stringvalidator.NoneOf("*"),
111112
},
112113
},
113114
"column_name": schema.StringAttribute{

0 commit comments

Comments
 (0)