terraform-provider-snowflake
terraform-provider-snowflake copied to clipboard
Qualified name availability in Resources and Data Sources
Is your feature request related to a problem? Please describe.
Newer resources require the usage of qualified name
which is not available in either existing resources or data sources. Example snowflake_table_column_masking_policy_application
snowflake_grant_privileges_to_role
.
Looping through these types of resources I have to build the qualified names myself from bits of available data.
resource snowflake_table_column_masking_policy_application masking_policy_sandbox {
provider = snowflake.masking_admin
for_each = local.masking_policy_sandbox
# The qualified_name is in format "DATABASE"."SCHEMA"."TABLE"
# FIXME: Take qualified_name from data source when it comes available
table = "\"${each.value.table.database}\".\"${each.value.table.schema}\".\"${each.value.table.name}\""
column = each.value.column
masking_policy = "${each.value.table.database}.${each.value.table.schema}.MASKING_POLICY_${each.value.type}_${each.value.masking_policy}"
}
Describe the solution you'd like
Resources and Data sources should have qualified_name already available as a parameter
Describe alternatives you've considered
Currently manually building these qualified names
Additional context