Skip to content

Commit

Permalink
Add fully_qualified_name field for remaining resources
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jmichalak committed Aug 12, 2024
1 parent d92d1a3 commit 09183d0
Show file tree
Hide file tree
Showing 152 changed files with 988 additions and 287 deletions.
25 changes: 23 additions & 2 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ across different versions.

## v0.94.x ➞ v0.95.0

### New `fully_qualified_name` field in all resources.
We added a new `fully_qualified_name` to all resources. This should help with referencing other resources in fields that expect a fully qualified name. For example, instead of
### New `fully_qualified_name` field in the resources.
We added a new `fully_qualified_name` to snowflake resources. This should help with referencing other resources in fields that expect a fully qualified name. For example, instead of
writing

```object_name = “\”${snowflake_table.database}\”.\”${snowflake_table.schema}\”.\”${snowflake_table.name}\””```
Expand All @@ -16,6 +16,27 @@ writing

```object_name = snowflake_table.fully_qualified_name```

Some of the resources are excluded from this change:
- deprecated resources
- `snowflake_database_old`
- `snowflake_oauth_integration`
- `snowflake_saml_integration`
- resources for which fully qualified name is not appropriate
- `snowflake_account_parameter`
- `snowflake_account_password_policy_attachment`
- `snowflake_network_policy_attachment`
- `snowflake_session_parameter`
- `snowflake_table_constraint`
- `snowflake_table_column_masking_policy_application`
- `snowflake_tag_masking_policy_association`
- `snowflake_tag_association`
- `snowflake_user_password_policy_attachment`
- `snowflake_user_public_keys`
- grant resources

#### *(breaking change)* removed `qualified_name` from `snowflake_masking_policy`, `snowflake_network_rule`, `snowflake_password_policy` and `snowflake_table`
Because of introducing a new field for all of the resources, `qualified_name` was removed from `snowflake_masking_policy`, `snowflake_network_rule`, `snowflake_password_policy` and `snowflake_table`. State is automatically migrated.

### snowflake_user resource changes

#### *(breaking change)* user parameters added to snowflake_user resource
Expand Down
1 change: 1 addition & 0 deletions docs/resources/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ resource "snowflake_account" "ac1" {

### Read-Only

- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.
- `is_org_admin` (Boolean) Indicates whether the ORGADMIN role is enabled in an account. If TRUE, the role is enabled.

Expand Down
1 change: 1 addition & 0 deletions docs/resources/account_role.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ resource "snowflake_account_role" "complete" {

### Read-Only

- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.
- `show_output` (List of Object) Outputs the result of `SHOW ROLES` for the given role. (see [below for nested schema](#nestedatt--show_output))

Expand Down
1 change: 1 addition & 0 deletions docs/resources/alert.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ resource "snowflake_alert" "alert" {

### Read-Only

- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.

<a id="nestedblock--alert_schedule"></a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ resource "snowflake_api_authentication_integration_with_authorization_code_grant
### Read-Only

- `describe_output` (List of Object) Outputs the result of `DESCRIBE SECURITY INTEGRATIONS` for the given security integration. (see [below for nested schema](#nestedatt--describe_output))
- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.
- `show_output` (List of Object) Outputs the result of `SHOW SECURITY INTEGRATIONS` for the given security integration. (see [below for nested schema](#nestedatt--show_output))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ resource "snowflake_api_authentication_integration_with_client_credentials" "tes
### Read-Only

- `describe_output` (List of Object) Outputs the result of `DESCRIBE SECURITY INTEGRATIONS` for the given security integration. (see [below for nested schema](#nestedatt--describe_output))
- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.
- `show_output` (List of Object) Outputs the result of `SHOW SECURITY INTEGRATIONS` for the given security integration. (see [below for nested schema](#nestedatt--show_output))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ resource "snowflake_api_authentication_integration_with_jwt_bearer" "test" {
### Read-Only

- `describe_output` (List of Object) Outputs the result of `DESCRIBE SECURITY INTEGRATIONS` for the given security integration. (see [below for nested schema](#nestedatt--describe_output))
- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.
- `show_output` (List of Object) Outputs the result of `SHOW SECURITY INTEGRATIONS` for the given security integration. (see [below for nested schema](#nestedatt--show_output))

Expand Down
1 change: 1 addition & 0 deletions docs/resources/api_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ resource "snowflake_api_integration" "gcp" {
- `azure_consent_url` (String)
- `azure_multi_tenant_app_name` (String)
- `created_on` (String) Date and time when the API integration was created.
- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.

## Import
Expand Down
1 change: 1 addition & 0 deletions docs/resources/cortex_search_service.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ resource "snowflake_cortex_search_service" "test" {
### Read-Only

- `created_on` (String) Creation date for the given Cortex search service.
- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.

## Import
Expand Down
1 change: 1 addition & 0 deletions docs/resources/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ resource "snowflake_database" "primary" {

### Read-Only

- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.

<a id="nestedblock--replication"></a>
Expand Down
1 change: 1 addition & 0 deletions docs/resources/database_role.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ resource "snowflake_database_role" "db_role" {

### Read-Only

- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.

## Import
Expand Down
1 change: 1 addition & 0 deletions docs/resources/dynamic_table.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ resource "snowflake_dynamic_table" "dt" {
- `cluster_by` (String) The clustering key for the dynamic table.
- `created_on` (String) Time when this dynamic table was created.
- `data_timestamp` (String) Timestamp of the data in the base object(s) that is included in the dynamic table.
- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.
- `is_clone` (Boolean) TRUE if the dynamic table has been cloned, else FALSE.
- `is_replica` (Boolean) TRUE if the dynamic table is a replica. else FALSE.
Expand Down
1 change: 1 addition & 0 deletions docs/resources/email_notification_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ resource "snowflake_email_notification_integration" "email_int" {

### Read-Only

- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.

## Import
Expand Down
1 change: 1 addition & 0 deletions docs/resources/external_function.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ resource "snowflake_external_function" "test_ext_func" {
### Read-Only

- `created_on` (String) Date and time when the external function was created.
- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.

<a id="nestedblock--arg"></a>
Expand Down
1 change: 1 addition & 0 deletions docs/resources/external_oauth_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ resource "snowflake_external_oauth_integration" "test" {
### Read-Only

- `describe_output` (List of Object) Outputs the result of `DESCRIBE SECURITY INTEGRATIONS` for the given security integration. (see [below for nested schema](#nestedatt--describe_output))
- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.
- `related_parameters` (List of Object) Paramteres related to this security integration. (see [below for nested schema](#nestedatt--related_parameters))
- `show_output` (List of Object) Outputs the result of `SHOW SECURITY INTEGRATIONS` for the given security integration. (see [below for nested schema](#nestedatt--show_output))
Expand Down
1 change: 1 addition & 0 deletions docs/resources/external_table.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ resource "snowflake_external_table" "external_table" {

### Read-Only

- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.
- `owner` (String) Name of the role that owns the external table.

Expand Down
1 change: 1 addition & 0 deletions docs/resources/failover_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ resource "snowflake_failover_group" "target_failover_group" {

### Read-Only

- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.

<a id="nestedblock--from_replica"></a>
Expand Down
1 change: 1 addition & 0 deletions docs/resources/file_format.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ resource "snowflake_file_format" "example_file_format" {

### Read-Only

- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.

## Import
Expand Down
1 change: 1 addition & 0 deletions docs/resources/function.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ resource "snowflake_function" "sql_test" {

### Read-Only

- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.

<a id="nestedblock--arguments"></a>
Expand Down
1 change: 1 addition & 0 deletions docs/resources/managed_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ resource "snowflake_managed_account" "account" {

- `cloud` (String) Cloud in which the managed account is located.
- `created_on` (String) Date and time when the managed account was created.
- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.
- `locator` (String) Display name of the managed account.
- `region` (String) Snowflake Region in which the managed account is located.
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/masking_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ resource "snowflake_masking_policy" "test" {

### Read-Only

- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.
- `qualified_name` (String) Specifies the qualified identifier for the masking policy.

<a id="nestedblock--signature"></a>
### Nested Schema for `signature`
Expand Down
1 change: 1 addition & 0 deletions docs/resources/materialized_view.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ SQL

### Read-Only

- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.

<a id="nestedblock--tag"></a>
Expand Down
1 change: 1 addition & 0 deletions docs/resources/network_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ resource "snowflake_network_policy" "basic" {
### Read-Only

- `describe_output` (List of Object) Outputs the result of `DESCRIBE NETWORK POLICY` for the given network policy. (see [below for nested schema](#nestedatt--describe_output))
- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.
- `show_output` (List of Object) Outputs the result of `SHOW NETWORK POLICIES` for the given network policy. (see [below for nested schema](#nestedatt--show_output))

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/network_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ resource "snowflake_network_rule" "rule" {

### Read-Only

- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.
- `qualified_name` (String) Qualified name of the network rule.

## Import

Expand Down
1 change: 1 addition & 0 deletions docs/resources/notification_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ resource "snowflake_notification_integration" "integration" {
- `aws_sqs_external_id` (String, Deprecated) The external ID that Snowflake will use when assuming the AWS role
- `aws_sqs_iam_user_arn` (String, Deprecated) The Snowflake user that will attempt to assume the AWS role.
- `created_on` (String) Date and time when the notification integration was created.
- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `gcp_pubsub_service_account` (String) The GCP service account identifier that Snowflake will use when assuming the GCP role
- `id` (String) The ID of this resource.

Expand Down
1 change: 1 addition & 0 deletions docs/resources/oauth_integration_for_custom_clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ resource "snowflake_oauth_integration_for_custom_clients" "complete" {
### Read-Only

- `describe_output` (List of Object) Outputs the result of `DESCRIBE SECURITY INTEGRATION` for the given integration. (see [below for nested schema](#nestedatt--describe_output))
- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.
- `show_output` (List of Object) Outputs the result of `SHOW SECURITY INTEGRATION` for the given integration. (see [below for nested schema](#nestedatt--show_output))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ resource "snowflake_oauth_integration_for_partner_applications" "test" {
### Read-Only

- `describe_output` (List of Object) Outputs the result of `DESCRIBE SECURITY INTEGRATION` for the given integration. (see [below for nested schema](#nestedatt--describe_output))
- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.
- `show_output` (List of Object) Outputs the result of `SHOW SECURITY INTEGRATION` for the given integration. (see [below for nested schema](#nestedatt--show_output))

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/password_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ A password policy specifies the requirements that must be met to create and rese

### Read-Only

- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.
- `qualified_name` (String) The qualified name for the password policy.
1 change: 1 addition & 0 deletions docs/resources/pipe.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ resource "snowflake_pipe" "pipe" {

### Read-Only

- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.
- `notification_channel` (String) Amazon Resource Name of the Amazon SQS queue for the stage named in the DEFINITION column.
- `owner` (String) Name of the role that owns the pipe.
Expand Down
1 change: 1 addition & 0 deletions docs/resources/procedure.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ EOT

### Read-Only

- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.

<a id="nestedblock--arguments"></a>
Expand Down
1 change: 1 addition & 0 deletions docs/resources/resource_monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ resource "snowflake_resource_monitor" "monitor" {

### Read-Only

- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.

## Import
Expand Down
1 change: 1 addition & 0 deletions docs/resources/role.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ resource "snowflake_role" "complete" {

### Read-Only

- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.
- `show_output` (List of Object) Outputs the result of `SHOW ROLES` for the given role. (see [below for nested schema](#nestedatt--show_output))

Expand Down
1 change: 1 addition & 0 deletions docs/resources/row_access_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ resource "snowflake_row_access_policy" "example_row_access_policy" {

### Read-Only

- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.

## Import
Expand Down
1 change: 1 addition & 0 deletions docs/resources/saml2_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ resource "snowflake_saml2_integration" "test" {
### Read-Only

- `describe_output` (List of Object) Outputs the result of `DESCRIBE SECURITY INTEGRATION` for the given integration. (see [below for nested schema](#nestedatt--describe_output))
- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.
- `show_output` (List of Object) Outputs the result of `SHOW SECURITY INTEGRATION` for the given integration. (see [below for nested schema](#nestedatt--show_output))

Expand Down
1 change: 1 addition & 0 deletions docs/resources/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ resource "snowflake_schema" "schema" {
### Read-Only

- `describe_output` (List of Object) Outputs the result of `DESCRIBE SCHEMA` for the given object. In order to handle this output, one must grant sufficient privileges, e.g. [grant_ownership](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/grant_ownership) on all objects in the schema. (see [below for nested schema](#nestedatt--describe_output))
- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.
- `parameters` (List of Object) Outputs the result of `SHOW PARAMETERS IN SCHEMA` for the given object. (see [below for nested schema](#nestedatt--parameters))
- `show_output` (List of Object) Outputs the result of `SHOW SCHEMA` for the given object. (see [below for nested schema](#nestedatt--show_output))
Expand Down
1 change: 1 addition & 0 deletions docs/resources/scim_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ resource "snowflake_scim_integration" "test" {
### Read-Only

- `describe_output` (List of Object) Outputs the result of `DESCRIBE SECURITY INTEGRATIONS` for the given security integration. (see [below for nested schema](#nestedatt--describe_output))
- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.
- `show_output` (List of Object) Outputs the result of `SHOW SECURITY INTEGRATIONS` for the given security integration. (see [below for nested schema](#nestedatt--show_output))

Expand Down
1 change: 1 addition & 0 deletions docs/resources/secondary_database.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ resource "snowflake_task" "refresh_secondary_database" {

### Read-Only

- `fully_qualified_name` (String) Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
- `id` (String) The ID of this resource.

## Import
Expand Down
Loading

0 comments on commit 09183d0

Please sign in to comment.