Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,52 @@ List od code and variable (API) changes:

For more information about preview features, refer to the [Snowflake provider documentation](https://registry.terraform.io/providers/snowflakedb/snowflake/latest/docs/resources/stage#preview-features) and [Snowflake stage resource documentation](https://registry.terraform.io/providers/snowflakedb/snowflake/latest/docs/resources/stage).

## Known limitations

### Standard Snowflake Edition

When using "Standard" Snowflake Edition, `transformer` "default role" for schema might be failing, due to lack of support for `MATERIALIZED VIEW`. it can be easily workaround by overwriting default role definition:

```hcl
module "project_database" {
source = "getindata/database/snowflake"
# version = "x.x.x"

create_default_roles = true

schemas = {
test = {
roles = {
transformer = {
schema_grants = [{
privileges = [
"CREATE TEMPORARY TABLE",
"CREATE TAG",
"CREATE PIPE",
"CREATE PROCEDURE",
"USAGE",
"CREATE TABLE",
"CREATE FILE FORMAT",
"CREATE STAGE",
"CREATE TASK",
"CREATE FUNCTION",
"CREATE EXTERNAL TABLE",
"CREATE SEQUENCE",
"CREATE VIEW",
"CREATE STREAM"
]
}]
schema_objects_grants = {
"MATERIALIZED VIEW" = []
}
}
}
}
}
}

```

<!-- BEGIN_TF_DOCS -->


Expand Down
31 changes: 31 additions & 0 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ module "database" {
}
}

# This configuration might be used with "Standard" Snowflake edition, where MATERIALIZED VIEWs are not supported.
module "project_database" {
source = "../../"

Expand All @@ -90,4 +91,34 @@ module "project_database" {

create_default_roles = true
database_ownership_grant = snowflake_account_role.admin_role.name

schemas = {
test = {
roles = {
transformer = {
schema_grants = [{
privileges = [
"CREATE TEMPORARY TABLE",
"CREATE TAG",
"CREATE PIPE",
"CREATE PROCEDURE",
"USAGE",
"CREATE TABLE",
"CREATE FILE FORMAT",
"CREATE STAGE",
"CREATE TASK",
"CREATE FUNCTION",
"CREATE EXTERNAL TABLE",
"CREATE SEQUENCE",
"CREATE VIEW",
"CREATE STREAM"
]
}]
schema_objects_grants = {
"MATERIALIZED VIEW" = []
}
}
}
}
}
}