Skip to content

Commit

Permalink
chore: add more cases
Browse files Browse the repository at this point in the history
  • Loading branch information
PiotrSierkin-Ki committed Mar 25, 2024
1 parent a327d6d commit 66a3bab
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,36 @@ module "snowflake_database_role" {
source = "../../"
context = module.this.context

database_name = "PS_PLAYGROUND"
comment = "Database role for PS_PLAYGROUND"
name = "PS_DB_ROLE"
database_name = "TEST_PLAYGROUND"
comment = "Database role for TEST_PLAYGROUND"
name = "TEST_DB_ROLE"


# parent_database_role = "PS_DB_ROLE_1"
# granted_database_roles = [
# "PS_DB_ROLE_2",
# "PS_DB_ROLE_3"
# ]
# database_grants = [
# {
# privileges = ["USAGE", "CREATE SCHEMA"]
# },
# ]
parent_database_role = "TEST_DB_ROLE_1"
granted_database_roles = [
"TEST_DB_ROLE_2",
"TEST_DB_ROLE_3"
]
database_grants = [
{
privileges = ["USAGE", "CREATE SCHEMA"]
},
]

# schema_grants = [
# {
# schema_name = "BRONZE"
# privileges = ["USAGE"]
# },
# {
# future_schemas_in_database = true
# privileges = ["USAGE"]
# },
# {
# all_schemas_in_database = true
# privileges = ["USAGE"]
# },
# ]
schema_grants = [
{
schema_name = "BRONZE"
privileges = ["USAGE"]
},
{
future_schemas_in_database = true
privileges = ["USAGE"]
},
{
all_schemas_in_database = true
privileges = ["USAGE"]
},
]

schema_objects_grants = {
"TABLE" = [
Expand All @@ -46,19 +46,19 @@ module "snowflake_database_role" {
schema_name = "BRONZE"
}
]
"ICEBERG TABLE" = [
"SECRET" = [
{
privileges = ["SELECT"]
on_future = true
on_all = true
},
all_privileges = true
object_name = "SERVICE_NOW_CREDS_PW"
schema_name = "BRONZE"
}
]
"ALERT" = [
{
privileges = ["SELECT"]
object_name = "TEST_ICEBERG_TABLE"
schema_name = "BRONZE"
all_privileges = true
on_future = true
on_all = true
}
]
}
}


0 comments on commit 66a3bab

Please sign in to comment.