From ca7d7a17eb888f8f04646aba080610fed2dd007e Mon Sep 17 00:00:00 2001 From: Ian Rose Date: Mon, 7 Oct 2024 16:59:22 -0700 Subject: [PATCH] Accountadmin for granting imported privileges --- terraform/snowflake/modules/database/main.tf | 2 +- terraform/snowflake/modules/elt/roles.tf | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/terraform/snowflake/modules/database/main.tf b/terraform/snowflake/modules/database/main.tf index fa4bf19..03bb7cc 100644 --- a/terraform/snowflake/modules/database/main.tf +++ b/terraform/snowflake/modules/database/main.tf @@ -97,7 +97,7 @@ resource "snowflake_database" "this" { data_retention_time_in_days = var.data_retention_time_in_days lifecycle { - prevent_destroy = true + prevent_destroy = false } } diff --git a/terraform/snowflake/modules/elt/roles.tf b/terraform/snowflake/modules/elt/roles.tf index fb5575e..a84e392 100644 --- a/terraform/snowflake/modules/elt/roles.tf +++ b/terraform/snowflake/modules/elt/roles.tf @@ -185,6 +185,7 @@ resource "snowflake_grant_account_role" "logging_to_logger" { # Imported privileges for logging resource "snowflake_grant_privileges_to_account_role" "imported_privileges_to_logger" { + provider = snowflake.accountadmin account_role_name = snowflake_role.logger.name privileges = ["IMPORTED PRIVILEGES"] on_account_object {