Skip to content

Commit 1ee6a1e

Browse files
authored
Merge pull request #421 from cagov/274-implement-workaround-sharing-views
Grant TRANSFORM_READ role to ANALYTICS_READWRITECONTROL role
2 parents 3bb6095 + df291fe commit 1ee6a1e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

terraform/snowflake/modules/elt/roles.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,3 +193,17 @@ resource "snowflake_grant_privileges_to_account_role" "imported_privileges_to_lo
193193
object_name = "SNOWFLAKE"
194194
}
195195
}
196+
197+
198+
##############################################################
199+
# Grant TRANSFORM_READ role to ANALYTICS_READWRITECONTROL role
200+
# This is a workaround for sharing views
201+
# More backgorund information related to this is found
202+
# here - https://github.com/cagov/data-infrastructure/issues/274
203+
##############################################################
204+
205+
resource "snowflake_grant_account_role" "transform_read_to_analytics_rwc" {
206+
provider = snowflake.useradmin
207+
role_name = "${module.transform.name}_READ"
208+
parent_role_name = "${module.analytics.name}_READWRITECONTROL"
209+
}

0 commit comments

Comments
 (0)