Comments (4)
I believe I'm also seeing this exact same issue with snowflake_schema_grant and the "ownership" privilege.
-/+ resource "snowflake_schema_grant" "ownership" {
database_name = "MY_DATABASE"
~ id = "MY_DATABASE|PUBLIC||OWNERSHIP" -> (known after apply)
privilege = "OWNERSHIP"
~ roles = [ # forces replacement
+ "MY_USER",
]
schema_name = "PUBLIC"
- shares = [] -> null
}
from terraform-provider-snowflake.
I thought perhaps a workaround to this would be to write multiple privileges in the string.
Sadly, not.
For example it is valid to run this SQL:
GRANT USAGE, CREATE SCHEMA ON DATABASE "TEST_DATABASE" TO ROLE "ALL_ROLE";
I tried this out and it fails because there is validation requiring there to be only one privilege specified.
e.g.
resource "snowflake_database_grant" "all" {
database_name = "${snowflake_database.test_database.name}"
privilege = "USAGE, CREATE SCHEMA"
roles = ["${snowflake_role.all_role.name}"]
}
Got this error
Error: snowflake_database_grant.all: expected privilege to be one of [ALL CREATE SCHEMA IMPORTED PRIVILEGES MODIFY MONITOR OWNERSHIP REFERENCE_USAGE USAGE], got USAGE, CREATE SCHEMA
I tried a few variations, none of these work:
privilege = "USAGE CREATE SCHEMA"
privilege = "USAGE|CREATE SCHEMA"
privilege = ["USAGE", "CREATE SCHEMA"]
Of course the list doesn't work, the property is a string.
The README says:
Across the entire Snowflake account, all of the databases to which a single grant is attached must be declared by a single snowflake_database_grant resource.
How is it possible to specify multiple databases in a single snowflake_database_grant
resource? The database_name
property is also a string.
from terraform-provider-snowflake.
+1
from terraform-provider-snowflake.
Going to close this as we are going to be removing support for ALL grants.
If still occurring after that, feel free to re-open.
from terraform-provider-snowflake.
Related Issues (20)
- [General Usage]: How to pass argument_data_types using snowflake_grant_privileges_to_account_role HOT 4
- [Bug]: snowflake_account_parameter - CLIENT_PREFETCH_THREADS HOT 2
- [Docs]: Example Provider Configuration doesn't show anything about "user", still has deprecated "username" HOT 1
- [Bug]: Database clone not possible anymore in v0.93 HOT 3
- [Bug]: Error: failed to find allowed user domains, err = object does not exist HOT 14
- [Docs]: Faulty advice in resource_migration.md HOT 2
- [Feature]: SECRET and EXTERNAL ACCESS INTEGRATION HOT 2
- [Feature]: snowflake_unsafe_execute as a permanent feature HOT 5
- [Feature]: enable attaching network_policy to snowflake_oauth_integration HOT 1
- snowflake_user_parameter resource is missing HOT 3
- [Feature]: Missing OpenTofu Registry GPG Key HOT 3
- [Bug]: error_integration on resource snowflake_task not working HOT 2
- [Bug]: snowflake_user: default_role attribute breaks the apply HOT 8
- [Bug]: "snowflake_tag_association" failing if table was recreated without a tag outside of Terraform HOT 1
- [Bug]: invalid property 'SYNC_PASSWORD' for 'INTEGRATION - SCIM - AZURE' HOT 4
- [Bug]: Snowflake_Warehouse Resource Limits Max Cluster Count HOT 4
- [Bug]: Missing ROLE when listing User Grants HOT 5
- [Feature]: Support snowflake_user TYPE property HOT 2
- [Feature]: Add "CREATE NOTEBOOK" privilege to the list of allowed plural object types for all and future lists in snowflake_grant_privileges_to_database_role resource. HOT 2
- [Feature]: properly mark breaking changes in release notes HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-snowflake.