From a91daf7588a29cf8331fe0311189479afd078de1 Mon Sep 17 00:00:00 2001 From: Bora Kou Date: Mon, 16 Dec 2024 10:09:27 -0500 Subject: [PATCH] Fix spacing. --- storage_integration.tf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/storage_integration.tf b/storage_integration.tf index 153a521..7266a24 100644 --- a/storage_integration.tf +++ b/storage_integration.tf @@ -13,19 +13,19 @@ locals { [for bucket_id in local.pipeline_bucket_ids : "${local.snowflake_storage_provider}://${bucket_id}/"] ) - storage_allowed_locations_snowsql = join(",", [ for i in local.storage_allowed_locations: join("", ["'", i, "'"]) ]) + storage_allowed_locations_snowsql = join(",", [for i in local.storage_allowed_locations: join("", ["'", i, "'"])]) } resource "snowflake_storage_integration" "this" { - count = local.terraform_resource_provider == "snowflake" ? 1: 0 + count = local.terraform_resource_provider == "snowflake" ? 1 : 0 provider = snowflake.storage_integration_role name = local.storage_integration_name type = "EXTERNAL_STAGE" enabled = true storage_allowed_locations = local.storage_allowed_locations - storage_provider = local.snowflake_storage_provider - storage_aws_role_arn = "arn:${local.aws_partition}:iam::${local.account_id}:role/${local.s3_reader_role_name}" + storage_provider = local.snowflake_storage_provider + storage_aws_role_arn = "arn:${local.aws_partition}:iam::${local.account_id}:role/${local.s3_reader_role_name}" } ## Create Snowflake storage integration with SnowSQL Terraform provider if the official Snowflake Terraform provider not yet support the specific sovereign cloud. @@ -54,9 +54,9 @@ resource "snowsql_exec" "snowflake_storage_integration" { } locals { - storage_integration_user_arn = local.terraform_resource_provider == "snowflake" ? snowflake_storage_integration.this[0].storage_aws_iam_user_arn : [ for map in jsondecode(nonsensitive(snowsql_exec.snowflake_storage_integration[0].read_results)): map if map.property == "STORAGE_AWS_IAM_USER_ARN" ][0]["property_value"] + storage_integration_user_arn = local.terraform_resource_provider == "snowflake" ? snowflake_storage_integration.this[0].storage_aws_iam_user_arn : [for map in jsondecode(nonsensitive(snowsql_exec.snowflake_storage_integration[0].read_results)): map if map.property == "STORAGE_AWS_IAM_USER_ARN"][0]["property_value"] - storage_integration_external_id = local.terraform_resource_provider == "snowflake" ? snowflake_storage_integration.this[0].storage_aws_external_id : [ for map in jsondecode(nonsensitive(snowsql_exec.snowflake_storage_integration[0].read_results)): map if map.property == "STORAGE_AWS_EXTERNAL_ID" ][0]["property_value"] + storage_integration_external_id = local.terraform_resource_provider == "snowflake" ? snowflake_storage_integration.this[0].storage_aws_external_id : [for map in jsondecode(nonsensitive(snowsql_exec.snowflake_storage_integration[0].read_results)): map if map.property == "STORAGE_AWS_EXTERNAL_ID"][0]["property_value"] } resource "snowflake_integration_grant" "this" {