-
Notifications
You must be signed in to change notification settings - Fork 427
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
feat: Data source for list databases #861
Conversation
Would it be possible to instead create a |
Sure! why not? The reason to use it plural is due to avoid some confusion respect the resource name "snowflake_database", but if you consider there is no problem with that I can update the PR with the data source in singular :) |
@jmrobles ya because we use |
hmmm @jmrobles sorry I don't think I was clear 😅 Instead of outputting a list of databases, do you think it's possible to create the data source to just read one database from a specified |
Ah, ok I understand you. The motivation of this PR is because in a project that I'm working on, we need to create a user account per database. The idea is that automatically those user will be maintained without the need of declare in locals or vars section. |
@jmrobles ah ok, then let's change it back to plural. Would be great if you could create a new data source with the singular form so that people can use it as a singular data source instead of a list. |
name = "DEMO_DB" | ||
} | ||
|
||
resource "snowflake_database" "backup" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can remove this resource, you can just keep the data source as the example. Same for the one below
/ok-to-test sha=abe9aca |
Integration tests failure for abe9aca |
I needed to write a custom TestStep check function. |
/ok-to-test sha=be94510 |
Integration tests success for be94510 |
Could you run |
Sure! Done, sorry, I forgot to re-run it. |
/ok-to-test sha=7145a89 |
Integration tests success for 7145a89 |
Add the ability to read the current databases in Snowflake (as far as the databases that the role used has the USAGE privilege on those databases).
Test Plan
It's easy to test. Just run and retrieve the Snowflake Account's databases
[X] Acceptance test
References
Feature Request: #859