Skip to content

Commit

Permalink
chore: remove database name
Browse files Browse the repository at this point in the history
  • Loading branch information
PiotrSierkin-Ki committed Apr 18, 2024
1 parent 18ee34b commit 0014602
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ locals {

database_grants = {
for database_grant in var.database_grants :
"${one(snowflake_database_role.this[*].database)}_${one(snowflake_database_role.this[*].name)}_${database_grant.all_privileges == true ? "ALL" : "CUSTOM"}" => database_grant
"${one(snowflake_database_role.this[*].name)}_${database_grant.all_privileges == true ? "ALL" : "CUSTOM"}" => database_grant
}

schema_grants = {
Expand All @@ -31,7 +31,7 @@ locals {
)
] : [grant]
]) :
"${one(snowflake_database_role.this[*].database)}_${one(snowflake_database_role.this[*].name)}_${
"${one(snowflake_database_role.this[*].name)}_${
schema_grant.schema_name != null ? schema_grant.schema_name :
schema_grant.all_schemas_in_database != false ? "ALL_SCHEMAS" :
schema_grant.future_schemas_in_database != false ? "FUTURE_SCHEMAS" : ""
Expand Down Expand Up @@ -67,7 +67,7 @@ locals {
)
]
]
]) : "${one(snowflake_database_role.this[*].database)}_${one(snowflake_database_role.this[*].name)}${
]) : "${one(snowflake_database_role.this[*].name)}${
grant.object_type != null && grant.object_name != null ?
"_${grant.object_type}_${grant.object_name}_${grant.all_privileges == true ? "ALL" : "CUSTOM"}"
: ""
Expand Down

0 comments on commit 0014602

Please sign in to comment.