Snowflake-Labs / terraform-provider-snowflake

Terraform provider for managing Snowflake accounts
https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest
MIT License
552 stars 420 forks source link

[Bug]: S3GOV not supported, S3 storage type hardcoded for AWS. This is a regression from 83.1 #3212

Open theknowest opened 3 days ago

theknowest commented 3 days ago

Terraform CLI Version

1.6.6

Terraform Provider Version

98.0

Company Name

Snowflake

Terraform Configuration

resource "snowflake_storage_integration" "storage"{
  name                  = "S3GOVFEDRAMPHIGHTEST"
  type                  = "EXTERNAL_STAGE"
  storage_provider      = "S3GOV"
  storage_aws_role_arn  = "arn:aws:iam::001234567890:role/myrole"
  enabled               = true
  storage_allowed_locations = [
    "s3gov://mybucket1/mypath1/"
  ]
  storage_blocked_locations = [
    "s3gov://mybucket1/mypath1/sensitivedata/", "s3gov://mybucket2/mypath2/sensitivedata/"
  ]

}

Category

category:resource

Object type(s)

data_source:storage_integrations

Expected Behavior

When specifying an AWS storage integration type I am passing the S3GOV parameter and the terraform resource should pass that same s3gov provider type to Snowflake.

Actual Behavior

The hardcoded value S3 specified in the following file is being passed instead. This worked <= version 83.1 but has been broken since 92.0.link here I believe is the problematic code.

Steps to Reproduce

Build a basic terraform snowflake storage resource and specify the S3GOV type with S3 URLS. You will find the following error: Error: error creating storage integration: 003113 (42601): Invalid location error: Specified location 's3gov://mybucket1/mypath1/' does not match the prefix 's3://' expected by storage provider 'S3'.

How much impact is this issue causing?

High

Logs

No response

Additional Information

No response

Would you like to implement a fix?

sfc-gh-jcieslak commented 2 days ago

Hey 👋 The solution is already proposed in https://github.com/Snowflake-Labs/terraform-provider-snowflake/pull/3213, we should merge it soon and the next released version should be able to handle other s3 protocols.

theknowest commented 2 days ago

This is Awesome!

I will confirm the pull request, but this is great news!

On Fri, Nov 22, 2024 at 1:58 AM Jan Cieślak @.***> wrote:

Hey 👋 The solution is already proposed in #3213 https://github.com/Snowflake-Labs/terraform-provider-snowflake/pull/3213, we should merge it soon and the next released version should be able to handle other s3 protocols.

— Reply to this email directly, view it on GitHub https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3212#issuecomment-2493371025, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYHWLSDZH6KFU6BJVFJGD2T2B355TAVCNFSM6AAAAABSGHF5GCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJTGM3TCMBSGU . You are receiving this because you authored the thread.Message ID: @.*** .com>

-- Stephen Jacobsohn Staff Cloud Support Engineer

EMAIL @.***

Snowflake Inc. 450 Concar Drive San Mateo, CA 94402