-
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
Is CREATE MODEL privileged allowed with resource snowflake_grant_privileges_to_role in version 0.86.0? #2563
Comments
Hey @alvarosaavedrau. Thanks for reaching out to us. We do not support this privilege in 0.86.0 version. It was probably added to the docs just recently. We will add this in one of the nearest releases. |
We look forward to this new change, thank you very much! |
Fixes: #2533 Terraform couldn't read privileges for External volumes, because Snowflake returns a shorter `VOLUME` name where we expect `EXTERNAL VOLUME` to be returned. The proposed fix relies on replacing `EXTERNAL VOLUME` with `VOLUME` in the prepare read request function so that the Read operation will be untouched and will work for external volumes. ## Test Plan <!-- detail ways in which this PR has been tested or needs to be tested --> * [x] acceptance tests to show the fix works (didn't pass without the fix) <!-- add more below if you think they are relevant --> ## Other Wrote to the docs team to add this case to the SHOW GRANTS page. **Update**: added missing privileges (CREATE MODEL needed for #2563)
Hey @alvarosaavedrau. We have released the fix as part of v0.87.0 release. Please follow the migration guide during the update. Please confirm that the issue is resolved in the newest version. Thanks! |
Hi, I am using this version 0.87.0 and 1.4.1 of terraform, now this │ Error: expected privilege to be one of ["CREATE TEMPORARY TABLE" "CREATE VIEW" "OWNERSHIP" "USAGE" "ALL PRIVILEGES" "MONITOR" "ADD SEARCH OPTIMIZATION" "CREATE FUNCTION" "CREATE ROW ACCESS POLICY" "CREATE MASKING POLICY" "CREATE PIPE" "CREATE SEQUENCE" "CREATE STREAMLIT" "CREATE EXTERNAL TABLE" "CREATE PROCEDURE" "CREATE SESSION POLICY" "CREATE TAG" "CREATE DYNAMIC TABLE" "CREATE FILE FORMAT" "CREATE TABLE" "MODIFY" "CREATE MATERIALIZED VIEW" "CREATE STAGE" "CREATE STREAM" "CREATE TASK"], got CREATE MODEL
│
│ with module.snowflake-schema["********"].snowflake_schema_grant.mySchemaGrant["CREATE_MODEL"],
│ on ../modules/snowflake-schema/32-schema.tf line 28, in resource "snowflake_schema_grant" "mySchemaGrant":
│ 28: privilege = replace ( each.key , "_" , " ")
│ Is it possible to use this privilege for the resource |
I'm not sure about |
Hey, for migration those can be helpful resources:
|
Hello @sfc-gh-jcieslak, I confirm that the Before with the resource
tfvars file
OWNERSHIP privilege not allowedTo add more information about this resource, the OWNERSHIP privilege can no longer be used with the
|
Yes, with new grant resources, only one grant call to a role can be made (1 resource = 1 grant privilege to role call). It was intentional to make the resource simple and as you pointed out terraform has for_each which is the same thing as the role list. |
I take this opportunity to ask. |
@alvarosaavedrau yes, this is not yet merged. After the merge, we also have to release it (probably tomorrow). The resource was deprecated a long time ago but the Terraform docs plugin is not using this information out-of-the-box, so we had to do some gymnastics to add it there. All deprecated resources will be marked accordingly after #2581. |
Closing as the |
Terraform CLI and Provider Versions
Terraform version 1.0.0
Provider version 0.55.1
Use Cases or Problem Statement
With the version 0.55.1 we can't use the CREATE MODEL privilege, we get the following error:
Proposal
We want to use the CREATE MODEL privilege with the version 0.55.1, we know this is not possible, so we are trying the 0.86.0 version (latest at 27/02/2024). But we get another errores of resources deprecated.
We need to know if in this last version the CREATE MODEL privilege is usable. So we would update all the other resources that change with this version, compared with 0.55.1 version.
How much impact is this issue causing?
High
Additional Information
No response
The text was updated successfully, but these errors were encountered: