terraform-provider-snowflake
terraform-provider-snowflake copied to clipboard
Question: Ownership of database at creation
Hi, more a question then a bug or request.
Is there a way I can set ownership of a table created with Terraform? I would like to use a custom-made role to create and own all databases, but I'm failing on finding out how to do that or if even possible.
Is this what you're looking for?
Thanks for your reply! Isn't that read-only, meaning that this is not a parameter which I can set but only read? I found kind of a workaround, which is setting the default role for our CI-Runner user according to our role-hierarchy. It would be still nice, though, if one could set the ownership for a resource in the code base. Would allow distributing ownership across multiple roles. In our setup, everything is now owned by this one role
Hey 👋 Closing the issue as it's referring to the deprecated resource and we're not supporting them. Please, try to use the latest provider version with the non-deprecated resources (e.g. snowflake_grant_privileges_to_account_role). If the issue persists on the non-deprecated resource (or the feature is present in Snowflake, but not in the provider), please create a new GitHub issue. The migration guide may help during migration to the latest resources. Here's a list of the latest, non-deprecated, grant resources:
Resources snowflake_grant_privileges_to_database_role snowflake_grant_privileges_to_account_role snowflake_grant_account_role snowflake_grant_database_role snowflake_grant_application_role (coming soon) snowflake_grant_privileges_to_share snowflake_grant_ownership (coming soon) <- This is what will resolve your issue
Data sources snowflake_grants