Open scizorman opened 4 months ago
Hey @scizorman. Thanks for reporting the issue.
This looks like a bug/missing feature in Snowflake.
From the provider side, we have to be able to run read (SHOW GRANTS ON
) to be able to calculate the difference and plan the terraform actions accordingly. We will check if the COMPUTE POOL grants are visible in any other SHOW GRANTS commands. If so, we will consider introducing a workaround. We will also raise this issue on Snowflake side but it would help if you could file this as a bug too (i.e. not being able to run SHOW GRANTS ON COMPUTE POOL <object>
).
cc: @sfc-gh-jcieslak
@sfc-gh-asawicki Thanks for your reply.
We will also raise this issue on Snowflake side but it would help if you could file this as a bug too (i.e. not being able to run
SHOW GRANTS ON COMPUTE POOL <object>)
.
I submitted a request to the Snowflake support case, asking them to enable the execution of SHOW GRANTS ON COMPUTE POOL <object_name>
. I have also informed them about this GitHub issue.
Terraform CLI and Provider Versions
Terraform Configuration
Expected Behavior
The following SQL is executed and the grant of
USAGE
privileges to COMPUTE POOL succeeds.Actual Behavior
It appears that before executing the GRANT statement, an attempt is being made to check the existing GRANTS by running
SHOW GRANTS ON ...
. However, the statementSHOW GRANTS ON COMPUTE POOL <object_name>
does not exist in Snowflake.As a result, the query that actually gets executed is
SHOW GRANTS ON
, which leads to a syntax error, causing the terraform apply to fail.The console log is below.
Steps to Reproduce
terraform apply
: The error described in Actual behaviors occurs.terraform plan
: The error described below occurs. And the Terraform state is broken.How much impact is this issue causing?
Medium
Logs
No response
Additional Information
No response