Skip to content

Commit

Permalink
Fix spacing.
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-bkou committed Dec 16, 2024
1 parent 3829984 commit a91daf7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions storage_integration.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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" {
Expand Down

0 comments on commit a91daf7

Please sign in to comment.