Skip to content

Commit 28f3fcf

Browse files
authored
Doc updates (#1254)
* clarify sql_permissions edge cases on UC workspaces * set encryption on root bucket and block public acl * clarify default_catalog_name
1 parent ae63552 commit 28f3fcf

File tree

4 files changed

+42
-9
lines changed

4 files changed

+42
-9
lines changed

docs/guides/aws-workspace.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,23 @@ resource "aws_s3_bucket" "root_storage_bucket" {
212212
})
213213
}
214214
215+
resource "aws_s3_bucket_server_side_encryption_configuration" "root_storage_bucket" {
216+
bucket = aws_s3_bucket.root_storage_bucket.bucket
217+
218+
rule {
219+
apply_server_side_encryption_by_default {
220+
sse_algorithm = "AES256"
221+
}
222+
}
223+
}
224+
215225
resource "aws_s3_bucket_public_access_block" "root_storage_bucket" {
216-
bucket = aws_s3_bucket.root_storage_bucket.id
217-
ignore_public_acls = true
218-
depends_on = [aws_s3_bucket.root_storage_bucket]
226+
bucket = aws_s3_bucket.root_storage_bucket.id
227+
block_public_acls = true
228+
block_public_policy = true
229+
ignore_public_acls = true
230+
restrict_public_buckets = true
231+
depends_on = [aws_s3_bucket.root_storage_bucket]
219232
}
220233
221234
data "databricks_aws_bucket_policy" "this" {

docs/guides/unity-catalog.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,13 @@ resource "aws_s3_bucket" "metastore" {
145145
})
146146
}
147147
148-
resource "aws_s3_bucket_public_access_block" "root_storage_bucket" {
149-
bucket = aws_s3_bucket.metastore.id
150-
ignore_public_acls = true
151-
depends_on = [aws_s3_bucket.metastore]
148+
resource "aws_s3_bucket_public_access_block" "metastore" {
149+
bucket = aws_s3_bucket.metastore.id
150+
block_public_acls = true
151+
block_public_policy = true
152+
ignore_public_acls = true
153+
restrict_public_buckets = true
154+
depends_on = [aws_s3_bucket.metastore]
152155
}
153156
154157
data "aws_iam_policy_document" "passrole_for_uc" {

docs/resources/mws_workspaces.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,23 @@ resource "aws_s3_bucket" "root_storage_bucket" {
141141
tags = var.tags
142142
}
143143
144+
resource "aws_s3_bucket_server_side_encryption_configuration" "root_storage_bucket" {
145+
bucket = aws_s3_bucket.root_storage_bucket.bucket
146+
147+
rule {
148+
apply_server_side_encryption_by_default {
149+
sse_algorithm = "AES256"
150+
}
151+
}
152+
}
153+
144154
resource "aws_s3_bucket_public_access_block" "root_storage_bucket" {
145-
bucket = aws_s3_bucket.root_storage_bucket.id
146-
ignore_public_acls = true
155+
bucket = aws_s3_bucket.root_storage_bucket.id
156+
block_public_acls = true
157+
block_public_policy = true
158+
ignore_public_acls = true
159+
restrict_public_buckets = true
160+
depends_on = [aws_s3_bucket.root_storage_bucket]
147161
}
148162
149163
data "databricks_aws_bucket_policy" "this" {
@@ -153,6 +167,7 @@ data "databricks_aws_bucket_policy" "this" {
153167
resource "aws_s3_bucket_policy" "root_bucket_policy" {
154168
bucket = aws_s3_bucket.root_storage_bucket.id
155169
policy = data.databricks_aws_bucket_policy.this.json
170+
depends_on = [aws_s3_bucket_public_access_block.root_storage_bucket]
156171
}
157172
158173
resource "databricks_mws_storage_configurations" "this" {

docs/resources/sql_permissions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ subcategory: "Security"
55

66
-> **Note** Please switch to [databricks_grants](grants.md) with Unity Catalog to manage data access, which provides better and faster way for managing data security. `databricks_grants` resource *doesn't require a technical cluster to perform operations*. `databricks_sql_permissions` will be removed, once Unity Catalog is Generally Available.
77

8+
-> **Note** On workspaces with Unity Catalog enabled, you may run into errors such as `Error: cannot create sql permissions: cannot read current grants: For unity catalog, please specify the catalog name explicitly. E.g. SHOW GRANT ``[email protected]`` ON CATALOG main`. This happens if your `default_catalog_name` was set to a UC catalog instead of `hive_metastore`. The workaround is to re-assign the metastore again with the default catalog set to be `hive_metastore`. See [databricks_metastore_assignment](metastore_assignment.md).
9+
810
This resource manages data object access control lists in Databricks workspaces for things like tables, views, databases, and [more](https://docs.databricks.com/security/access-control/table-acls/object-privileges.html). In order to enable Table Access control, you have to login to the workspace as administrator, go to `Admin Console`, pick `Access Control` tab, click on `Enable` button in `Table Access Control` section, and click `Confirm`. The security guarantees of table access control **will only be effective if cluster access control is also turned on**. Please make sure that no users can create clusters in your workspace and all [databricks_cluster](cluster.md) have approximately the following configuration:
911

1012
```hcl

0 commit comments

Comments
 (0)