-
Notifications
You must be signed in to change notification settings - Fork 420
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
CREATE DATABASE FROM SHARE failing with "SQL compilation error: Share .. does not exist or not authorized." #2590
Comments
Hey @chrisweis. Thanks for reporting the issue. We will address database resource soon as part of https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/ROADMAP.md#supporting-all-snowflake-ga-features. We have improving identifiers on our roadmap too https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/ROADMAP.md#identifiers-rework. We will address it then. |
Also hit this issue. It's a regression that was introduced in version Shares can be created without issue when using version |
@sfc-gh-asawicki as this is a code regression are you able to look into this issue? We'd like to upgrade our version to make use of other fixes you've added, can't as this causes errors for new stages |
Hey @hhobson, @chrisweis. Please take a look at https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/MIGRATION_GUIDE.md#behavior-change-external-object-identifier-changes, there was a change in what we expect in the Also, the workaround described by @chrisweis should temporarily work but it is also working like that unintentionally, so it may change with the future versions of the provider. |
Saved us from burning a good few hours, thanks @chrisweis ! To automate the fix, you can use the following:
❤️ |
Hi all 👋 |
Important Note: Please read my "Additional Information" section below first
Terraform CLI and Provider Versions
Terraform Configuration
Expected Behavior
I expect the Terraform provider to generate the same SQL generated when I use the Snowsight GUI to attach this share:
Actual Behavior
The Terraform apply:
Steps to Reproduce
terraform apply
How much impact is this issue causing?
Medium
Logs
https://gist.github.com/chrisweis/68870058eb1ba7fe2cf3bd83a79cceb3
Additional Information
Ah!! Just before submitting this bug I realized that this combination enabled it to finally work.
Request: Since this took me a LONG time to discover, could we please improve the documentation for the database resource to clarify this so it's easier to understand and remember? This is the example in the docs that steered me in a challenging direction:
Thanks!
Related issues:
#2168
#2277
#1770
The text was updated successfully, but these errors were encountered: