-
Notifications
You must be signed in to change notification settings - Fork 8
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
[Epic] Introduce schema_id
for all object that use schema_name
#472
Comments
I've been wondering about this for a while. Thanks for starting this conversation with the cloud team, @bobbyiliev! This is a larger conversation, but I do wonder if we ought to require use of The one downside is that using IDs instead of names is substantially less ergonomic if you're managing databases and schemas outside of Terraform. If all I want to do is use Terraform to create a source in a schema named That said, I think most people use Terraform specifically to manage databases and schemas, and then using IDs is approximately as ergonomic as IDs since you would just say @morsapaes we've been connected with the folks who built the Snowflake Terraform provider, right? It'd be neat to try to talk to them to understand whether they also think using database/schema names instead of IDs was a mistake. |
@benesch I think we could use a data provider to get the id from the name in the case that databases are managed outside of TF. It's not that gross to do something like this if you don't know the DB id. data "materialize_database" "mydb" {
name = "mydb"
}
resource "materialize_table" "test_table" {
name = "test_table"
database = data.materialize_database.mydb.id
} |
@jubrad yes I agree! I just think it's a little more of a hassle:
|
schema_id
for all object that use schema_name
schema_id
for all object that use schema_name
As a follow-up task for #334 we can work on adding the
schema_id
when creating views, tables, etc.That way
schema_name = materialize_schema.schema.name
could beschema_id = materialize_schema.schema.id
which wouldn't change after a schema is renamed.Resources that currently rely on the
schema_name
:Data sources:
The text was updated successfully, but these errors were encountered: