Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: DEPLOYEN STORAGE_BLOCKED_LOCATION #2985

Closed
1 task
Covid-taskforce-veneficus opened this issue Aug 8, 2024 · 6 comments
Closed
1 task

[Bug]: DEPLOYEN STORAGE_BLOCKED_LOCATION #2985

Covid-taskforce-veneficus opened this issue Aug 8, 2024 · 6 comments
Assignees
Labels
bug Used to mark issues with provider's incorrect behavior resource:storage_integration Issue connected to the snowflake_storage_integration resource

Comments

@Covid-taskforce-veneficus
Copy link

Covid-taskforce-veneficus commented Aug 8, 2024

Terraform CLI Version

1.3.4

Terraform Provider Version

0.87.2

Terraform Configuration

+ resource "snowflake_storage_integration" "sf" {
      + azure_consent_url           = (known after apply)
      + azure_multi_tenant_app_name = (known after apply)
      + azure_tenant_id             = "*******"
      + comment                     = "Storage Account"
      + created_on                  = (known after apply)
      + enabled                     = true
      + id                          = (known after apply)
      + name                        = "TEST_STORAGE_INTEGRATION"
      + storage_allowed_locations   = [
          + "azure://sa20edw100s.blob.core.windows.net/container/",
        ]
      + storage_aws_external_id     = (known after apply)
      + storage_aws_iam_user_arn    = (known after apply)
      + storage_blocked_locations   = [
          + "azure://sa20edw100s.blob.core.windows.net/container/path1/",
        ]
      + storage_gcp_service_account = (known after apply)
      + storage_provider            = "AZURE"
      + type                        = "EXTERNAL_STAGE"
    }

Category

category:resource

Object type(s)

storage Integration

Expected Behavior

I expect that when i run DESC INTEGRATION TEST_STORAGE_INTEGRATION; in snowflake the storage_blocked_location is filled with azure://sa20edw100s.blob.core.windows.net/container/path1/. Meaning we cant make a stage using this path.

Actual Behavior

However, when I check the storage integration in Snowflake (DESC INTEGRATION TEST_STORAGE_INTEGRATION;), the storage_blocked_locations is empty. All other proporties are filled in correctly, showing the apply was succesfull.

I noticed that when I change the storage_blocked_location after a plan and apply (for example:azure://sa20edw100s.blob.core.windows.net/container/path2/). And i run a new plan and apply, the storage_blocked_location property is filled with the path of the storage_allowed_location.

I tested this twice my changing the storage_allowed_location to different paths for example: azure://sa20edw100s.blob.core.windows.net/container/test1/. After running the terraform plan and apply twice while changing the storage_blocked_location to a different path in between, the storage_blocked_location is filled with the storage_allowed_location. This was the case in both tests.

Steps to Reproduce

  • create a storage integration with a storage allowed location and a storage_blocked_location
  • deploy the storage integration by running a terraform plan and apply
  • check in snowflake if the storage_blocked_location is deployed by running: DESC INTEGRATION {name of integration};
  • change the storage_blocked_location to a different folder
  • deploy the storage integration again by running a terraform plan and apply
  • check in snowflake if the storage_blocked_location is deployed by running: DESC INTEGRATION {name of integration} ( i expect that the storage_blocked_location is now fileld with the storage_allowed_location.

How much impact is this issue causing?

Low

Logs

No response

Additional Information

No response

Would you like to implement a fix?

  • Yeah, I'll take it 😎
@Covid-taskforce-veneficus Covid-taskforce-veneficus added the bug Used to mark issues with provider's incorrect behavior label Aug 8, 2024
@sfc-gh-jcieslak
Copy link
Collaborator

Hey @Covid-taskforce-veneficus
This seems like a simple spelling error on the provider side. As you already mentioned, create works correctly, but the logic is a bit incorrect. I think I'll be able to put this in the next release (or the one after). For now, the only way of handling this would be to either use replace_triggered_by (causing re-create whenever storage_blocked_location is changed or change it manually in the worksheet and in the configuration (I think this results in in-place updates in Terraform, so the param is changed and not planning changes).

@sfc-gh-jcieslak sfc-gh-jcieslak self-assigned this Aug 8, 2024
@sfc-gh-jcieslak sfc-gh-jcieslak added the resource:storage_integration Issue connected to the snowflake_storage_integration resource label Aug 8, 2024
@Covid-taskforce-veneficus
Copy link
Author

Thanks @sfc-gh-jcieslak , which date will be the next release? Kind regards, Jacco

@sfc-gh-jcieslak
Copy link
Collaborator

sfc-gh-jcieslak commented Aug 14, 2024

Most likely somewhere around next week.

sfc-gh-jcieslak added a commit that referenced this issue Aug 16, 2024
@sfc-gh-jcieslak
Copy link
Collaborator

Hey @Covid-taskforce-veneficus 👋
Sorry for the big delay, but yesterday, we released a new provider version (v0.95.0) that should prevent this issue from occurring. Please upgrade and let us know if the issue disappeared.

@Covid-taskforce-veneficus
Copy link
Author

@sfc-gh-asawicki
Copy link
Collaborator

Great to hear that. Closing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to mark issues with provider's incorrect behavior resource:storage_integration Issue connected to the snowflake_storage_integration resource
Projects
None yet
Development

No branches or pull requests

3 participants