-
Notifications
You must be signed in to change notification settings - Fork 426
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]: Failed to describe stage on terraform plan #3265
Comments
Hi, After further investigation of the issue, we found the following error on all our stages: "DB"."PUBLIC"."STAGE" err 002003 (02000): SQL compilation error: But when we are looking on the query history of the user with which these queries are being executed we found the following error: But when we run this same describes or queries from the Snowflake UI, we can run it without finding any errors. |
Hi, We executed again a terraform plan isolating one of the stages, finding this errors after debugging: 2024-12-11T10:30:57.033+0100 [DEBUG] provider.terraform-provider-snowflake_v0.85.0: time="2024-12-11T10:30:57+01:00" level=error msg="error: 002003 (02000): SQL compilation error:\nDatabase 'DB' does not exist or not authorized." func="gosnowflake.(*snowflakeConn).queryContextInternal" file="connection.go:396" 2024-12-11T10:30:57.033+0100 [DEBUG] provider.terraform-provider-snowflake_v0.85.0: 2024/12/11 10:30:57 [DEBUG] sql-conn-query: [query DESCRIBE STAGE "DB"."PUBLIC"."STAGE" err 002003 (02000): SQL compilation error: |
Hi, Finally with the help of Snowflake Support we could fix the issue, which was provoked due to a change on the default role of the user who was running the queries on terraform, after modifying that everything works properly. Thank you for your help and sorry for the inconvenience. |
Hey @AJuanJim |
Terraform CLI Version
1.5.0
Terraform Provider Version
0.85.0
Company Name
No response
Terraform Configuration
Category
category:resource
Object type(s)
No response
Expected Behavior
0 changes on terraform plan
Actual Behavior
Error: Failed to describe stage
with module.sfbs.snowflake_stage.stage["DB.PUBLIC.STAGE"], on ../modules/snowflake_bs/db-objects.tf line 174, in resource "snowflake_stage" "stage": 174: resource "snowflake_stage" "stage" {
Id: , Err: [errors.go:17] object does not exist or not authorized
Steps to Reproduce
Run terraform plan
How much impact is this issue causing?
High
Logs
No response
Additional Information
No response
Would you like to implement a fix?
The text was updated successfully, but these errors were encountered: