Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 2.03 KB

identifiers.md

File metadata and controls

31 lines (21 loc) · 2.03 KB
page_title subcategory description
Identifiers rework

Identifiers rework

New computed fully qualified name field in resources

With the combination of quotes, old parsing methods, and other factors, it was a struggle to specify the fully qualified name of an object needed (e.g. #2164, #2754). Starting from version v0.95.0, every resource that represents an object in Snowflake (e.g. user, role), and not an association (e.g. grants) will have a new computed field named fully_qualified_name. With the new computed field, it will be much easier to use resources requiring fully qualified names, for examples of usage head over to the documentation for granting privileges to account role.

For example, instead of writing

object_name = “\”${snowflake_table.database}\”.\”${snowflake_table.schema}\”.\”${snowflake_table.name}\””
# for procedures
object_name = “\”${snowflake_procedure_sql.database}\”.\”${snowflake_procedure_sql.schema}\”.\”${snowflake_procedure_sql.name}\"(NUMBER, VARCHAR)”

now we can write

object_name = snowflake_table.fully_qualified_name

This is our recommended way of referencing other objects. However, if you don't manage the referenced object in Terraform, you can construct the proper id yourself like before: "\"database_name\".\"schema_name\".\"object_name\"" for schema-level objects, or "\"database_name\".\"schema_name\".\"procedure_name(NUMBER, VARCHAR)\"" for procedures. Note that quotes are necessary for correct parsing of an identifier.

This change was announced in v0.95.0 migration guide.