Quickly deploy Snowflake Database resources and attach Grants using a Terraform Module.
Simple usage:
module "database" {
source = "Infostrux-Solutions/database/snowflake"
name = "DATABASE_NAME"
comment = "Created by Terraform"
}
Full usage:
module "database" {
source = "Infostrux-Solutions/database/snowflake"
name = "DATABASE_NAME"
attach_grant_usage = true
usage_roles = ["SYSADMIN"]
usage_shares = []
usage_with_grant_option = true
attach_grant_modify = true
modify_roles = ["SYSADMIN"]
modify_shares = []
modify_with_grant_option = true
attach_grant_create_schema = true
create_schema_roles = ["SYSADMIN"]
create_schema_shares = []
create_schema_with_grant_option = true
attach_grant_monitor = true
monitor_roles = ["SYSADMIN"]
monitor_shares = []
monitor_with_grant_option = true
data_retention_time_in_days = 1
}
Name | Version |
---|---|
terraform | >= 0.13.1 |
snowflake | >=0.40.0 |
Name | Version |
---|---|
snowflake | >=0.40.0 |
No modules.
Name | Type |
---|---|
snowflake_database.database | resource |
snowflake_database_grant.grant_create_schema | resource |
snowflake_database_grant.grant_modify | resource |
snowflake_database_grant.grant_monitor | resource |
snowflake_database_grant.grant_usage | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
attach_grant_create_schema | Create the grant create_schema at the same time. (true|false) | bool |
false |
no |
attach_grant_modify | Create the grant modify at the same time. (true|false) | bool |
false |
no |
attach_grant_monitor | Create the grant monitor at the same time. (true|false) | bool |
false |
no |
attach_grant_usage | Create the grant usage at the same time. (true|false) | bool |
false |
no |
comment | A comment to add to the database resource. | string |
"Created by Terraform." |
no |
create_schema_roles | A list of roles that will be granted create_schema on the database. | list(string) |
[] |
no |
create_schema_shares | A list of roles that will be granted create_schema on the database shares. | list(string) |
[] |
no |
create_schema_with_grant_option | When this is set to true, allows the recipient role to grant the privileges to other roles. | bool |
false |
no |
data_retention_time_in_days | Days to retain deleted data for. Default is 1 | string |
1 |
no |
modify_roles | A list of roles that will be granted modify on the database. | list(string) |
[] |
no |
modify_shares | A list of roles that will be granted modify on the database shares. | list(string) |
[] |
no |
modify_with_grant_option | When this is set to true, allows the recipient role to grant the privileges to other roles. | bool |
false |
no |
monitor_roles | A list of roles that will be granted monitor on the database. | list(string) |
[] |
no |
monitor_shares | A list of roles that will be granted monitor on the database shares. | list(string) |
[] |
no |
monitor_with_grant_option | When this is set to true, allows the recipient role to grant the privileges to other roles. | bool |
false |
no |
name | The name to apply to the database resource. | string |
n/a | yes |
usage_roles | A list of roles that will be granted usage on the database. | list(string) |
[] |
no |
usage_shares | A list of roles that will be granted usage on the database shares. | list(string) |
[] |
no |
usage_with_grant_option | When this is set to true, allows the recipient role to grant the privileges to other roles. | bool |
false |
no |
Name | Description |
---|---|
database_id | The database resource ID. |
database_name | The database resource name. |
Module is maintained by Infostrux Solutions with help from these awesome contributors.
Apache 2 Licensed. See LICENSE for full details.