Skip to content
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

chore: Remove remaining deprecated features #3268

Merged
merged 11 commits into from
Dec 12, 2024
6 changes: 3 additions & 3 deletions CREATING_ISSUES.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ resource "snowflake_grant_privileges_to_account_role" "grant_on_procedure" {
account_role_name = snowflake_account_role.name
on_schema_object {
object_type = "PROCEDURE"
object_name = "\"${snowflake_database.database.name}\".\"${snowflake_schema.schema.name}\".\"${snowflake_procedure.procedure.name}\""
object_name = "\"${snowflake_database.database.name}\".\"${snowflake_schema.schema.name}\".\"${snowflake_procedure_sql.procedure.name}\""
}
}
```
Expand All @@ -202,7 +202,7 @@ resource "snowflake_grant_privileges_to_account_role" "grant_on_procedure" {
account_role_name = snowflake_account_role.name
on_schema_object {
object_type = "PROCEDURE"
object_name = "\"${snowflake_database.database.name}\".\"${snowflake_schema.schema.name}\".\"${snowflake_procedure.procedure.name}\"(NUMBER, VARCHAR)"
object_name = "\"${snowflake_database.database.name}\".\"${snowflake_schema.schema.name}\".\"${snowflake_procedure_sql.procedure.name}\"(NUMBER, VARCHAR)"
}
}
```
Expand All @@ -215,7 +215,7 @@ resource "snowflake_grant_privileges_to_account_role" "grant_on_procedure" {
account_role_name = snowflake_account_role.name
on_schema_object {
object_type = "PROCEDURE"
object_name = snowflake_procedure.procedure_name.fully_qualified_name
object_name = snowflake_procedure_sql.procedure_name.fully_qualified_name
}
}
```
Expand Down
77 changes: 37 additions & 40 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ across different versions.
> [!TIP]
> We highly recommend upgrading the versions one by one instead of bulk upgrades.

## v0.99.0 ➞ v1.0.0
## v0.100.0 ➞ v1.0.0

### Preview features flag
All of the preview features objects are now disabled by default. This includes:
Expand Down Expand Up @@ -72,34 +72,39 @@ provider "snowflake" {

### Removed deprecated objects
All of the deprecated objects are removed from v1 release. This includes:
<!-- TODO(next pr): link to entries in the migration guide regarding details for each of the resource/data source-->
- Resources
- `snowflake_database_old`
- `snowflake_role`
- `snowflake_oauth_integration`
- `snowflake_saml_integration`
- `snowflake_database_old` - see [migration guide](#new-feature-new-database-resources)
- `snowflake_role` - see [migration guide](#new-feature-new-snowflake_account_role-resource)
- `snowflake_oauth_integration` - see [migration guide](#new-feature-snowflake_oauth_integration_for_custom_clients-and-snowflake_oauth_integration_for_partner_applications-resources)
- `snowflake_saml_integration` - see [migration guide](#new-feature-snowflake_saml2_integration-resource)
- `snowflake_session_parameter`
- `snowflake_stream`
- `snowflake_tag_masking_policy_association`
- `snowflake_stream` - see [migration guide](#new-feature-snowflake_stream_on_directory_table-and-snowflake_stream_on_view-resource)
- `snowflake_tag_masking_policy_association` - see [migration guide](#snowflake_tag_masking_policy_association-deprecation)
- `snowflake_function`
- `snowflake_procedure`
- `snowflake_unsafe_execute` - see [migration guide](#unsafe_execute-resource-deprecation--new-execute-resource)
- Data sources
- `snowflake_role`
- `snowflake_role` - see [migration guide](#snowflake_role-data-source-deprecation)
- `snowflake_roles` - see [migration guide](#new-feature-account-role-data-source)
- Fields in the provider configuration:
- `account`
- `oauth_access_token`
- `oauth_client_id`
- `oauth_client_secret`
- `oauth_endpoint`
- `oauth_redirect_url`
- `oauth_refresh_token`
- `private_key_path`
- `region`
- `session_params`
- `username`
- `account` - see [migration guide](#behavior-change-deprecated-fields)
- OAuth related fields - see [migration guide](#structural-change-oauth-api):
- `oauth_access_token`
- `oauth_client_id`
- `oauth_client_secret`
- `oauth_endpoint`
- `oauth_redirect_url`
- `oauth_refresh_token`
- `browser_auth`
- `private_key_path` - see [migration guide](#private_key_path-deprecation)
- `region` - see [migration guide](#remove-redundant-information-region)
- `session_params` - see [migration guide](#rename-session_params--params)
- `username` - see [migration guide](#rename-username--user)
- Fields in `tag` resource:
- `object_name`

Additionally, `JWT` value is no longer available for `authenticator` field in the provider configuration.



## v0.99.0 ➞ v0.100.0

### *(preview feature/deprecation)* Function and procedure resources
Expand Down Expand Up @@ -1389,21 +1394,6 @@ Changes:
- `pattern` was renamed to `like`
- output of SHOW is enclosed in `show_output`, so before, e.g. `roles.0.comment` is now `roles.0.show_output.0.comment`

### *(new feature)* new snowflake_account_role resource

Already existing `snowflake_role` was deprecated in favor of the new `snowflake_account_role`. The old resource got upgraded to
have the same features as the new one. The only difference is the deprecation message on the old resource.

New fields:
- added `show_output` field that holds the response from SHOW ROLES. Remember that the field will be only recomputed if one of the fields (`name` or `comment`) are changed.

### *(breaking change)* refactored snowflake_roles data source

Changes:
- New `in_class` filtering option to filter out roles by class name, e.g. `in_class = "SNOWFLAKE.CORE.BUDGET"`
- `pattern` was renamed to `like`
- output of SHOW is enclosed in `show_output`, so before, e.g. `roles.0.comment` is now `roles.0.show_output.0.comment`

### *(new feature)* snowflake_streamlit resource
Added a new resource for managing streamlits. See reference [docs](https://docs.snowflake.com/en/sql-reference/sql/create-streamlit). In this resource, we decided to split `ROOT_LOCATION` in Snowflake to two fields: `stage` representing stage fully qualified name and `directory_location` containing a path within this stage to root location.

Expand Down Expand Up @@ -1759,6 +1749,11 @@ The `ForceNew` field was removed in favor of in-place Update for `name` paramete
So from now, these objects won't be re-created when the `name` changes, but instead only the name will be updated with `ALTER .. RENAME TO` statements.

## v0.87.0 ➞ v0.88.0

### snowflake_role data source deprecation

Already existing `snowflake_role` was deprecated in favor of the new `snowflake_roles`. You can have a similar behavior like before by specifying `pattern` field. Please adjust your Terraform configurations.

### snowflake_procedure resource changes
#### *(behavior change)* Execute as validation added
From now on, the `snowflake_procedure`'s `execute_as` parameter allows only two values: OWNER and CALLER (case-insensitive). Setting other values earlier resulted in falling back to the Snowflake default (currently OWNER) and creating a permadiff.
Expand Down Expand Up @@ -1961,7 +1956,7 @@ were already available in Golang Snowflake driver. This lead to several attribut
We will focus on the deprecated ones and show you how to adapt your current configuration to the new changes.

#### *(rename)* username ➞ user

Provider field `username` were renamed to `user`. Adjust your provider configuration like below:
```terraform
provider "snowflake" {
# before
Expand All @@ -1973,6 +1968,7 @@ provider "snowflake" {
```

#### *(structural change)* OAuth API
Provider fields regarding Oauth were renamed and nested. Adjust your provider configuration like below:

```terraform
provider "snowflake" {
Expand Down Expand Up @@ -2014,7 +2010,8 @@ provider "snowflake" {
}
```

#### *(todo)* private key path
#### private_key_path deprecation
Provider field `private_key_path` is now deprecated in favor of `private_key` and `file` Terraform function (see [docs](https://developer.hashicorp.com/terraform/language/functions/file)). Adjust your provider configuration like below:

```terraform
provider "snowflake" {
Expand All @@ -2027,7 +2024,7 @@ provider "snowflake" {
```

#### *(rename)* session_params ➞ params

Provider field `session_params` were renamed to `params`. Adjust your provider configuration like below:
```terraform
provider "snowflake" {
# before
Expand Down
106 changes: 0 additions & 106 deletions docs/data-sources/roles.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/guides/identifiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ For example, instead of writing
```
object_name = “\”${snowflake_table.database}\”.\”${snowflake_table.schema}\”.\”${snowflake_table.name}\””
# for procedures
object_name = “\”${snowflake_procedure.database}\”.\”${snowflake_procedure.schema}\”.\”${snowflake_procedure.name}\"(NUMBER, VARCHAR)”
object_name = “\”${snowflake_procedure_sql.database}\”.\”${snowflake_procedure_sql.schema}\”.\”${snowflake_procedure_sql.name}\"(NUMBER, VARCHAR)”
```

now we can write
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ provider "snowflake" {
- `params` (Map of String) Sets other connection (i.e. session) parameters. [Parameters](https://docs.snowflake.com/en/sql-reference/parameters). This field can not be set with environmental variables.
- `passcode` (String) Specifies the passcode provided by Duo when using multi-factor authentication (MFA) for login. Can also be sourced from the `SNOWFLAKE_PASSCODE` environment variable.
- `passcode_in_password` (Boolean) False by default. Set to true if the MFA passcode is embedded to the configured password. Can also be sourced from the `SNOWFLAKE_PASSCODE_IN_PASSWORD` environment variable.
- `password` (String, Sensitive) Password for user + password auth. Cannot be used with `browser_auth` or `private_key_path`. Can also be sourced from the `SNOWFLAKE_PASSWORD` environment variable.
- `password` (String, Sensitive) Password for user + password auth. Cannot be used with `private_key` and `private_key_passphrase`. Can also be sourced from the `SNOWFLAKE_PASSWORD` environment variable.
- `port` (Number) Specifies a custom port value used by the driver for privatelink connections. Can also be sourced from the `SNOWFLAKE_PORT` environment variable.
- `preview_features_enabled` (Set of String) A list of preview features that are handled by the provider. See [preview features list](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/v1-preparations/LIST_OF_PREVIEW_FEATURES_FOR_V1.md). Preview features may have breaking changes in future releases, even without raising the major version. This field can not be set with environmental variables. Valid options are: `snowflake_current_account_datasource` | `snowflake_account_password_policy_attachment_resource` | `snowflake_alert_resource` | `snowflake_alerts_datasource` | `snowflake_api_integration_resource` | `snowflake_cortex_search_service_resource` | `snowflake_cortex_search_services_datasource` | `snowflake_database_datasource` | `snowflake_database_role_datasource` | `snowflake_dynamic_table_resource` | `snowflake_dynamic_tables_datasource` | `snowflake_external_function_resource` | `snowflake_external_functions_datasource` | `snowflake_external_table_resource` | `snowflake_external_tables_datasource` | `snowflake_external_volume_resource` | `snowflake_failover_group_resource` | `snowflake_failover_groups_datasource` | `snowflake_file_format_resource` | `snowflake_file_formats_datasource` | `snowflake_managed_account_resource` | `snowflake_materialized_view_resource` | `snowflake_materialized_views_datasource` | `snowflake_network_policy_attachment_resource` | `snowflake_network_rule_resource` | `snowflake_email_notification_integration_resource` | `snowflake_notification_integration_resource` | `snowflake_object_parameter_resource` | `snowflake_password_policy_resource` | `snowflake_pipe_resource` | `snowflake_pipes_datasource` | `snowflake_current_role_datasource` | `snowflake_sequence_resource` | `snowflake_sequences_datasource` | `snowflake_share_resource` | `snowflake_shares_datasource` | `snowflake_parameters_datasource` | `snowflake_stage_resource` | `snowflake_stages_datasource` | `snowflake_storage_integration_resource` | `snowflake_storage_integrations_datasource` | `snowflake_system_generate_scim_access_token_datasource` | `snowflake_system_get_aws_sns_iam_policy_datasource` | `snowflake_system_get_privatelink_config_datasource` | `snowflake_system_get_snowflake_platform_info_datasource` | `snowflake_table_column_masking_policy_application_resource` | `snowflake_table_constraint_resource` | `snowflake_user_authentication_policy_attachment_resource` | `snowflake_user_public_keys_resource` | `snowflake_user_password_policy_attachment_resource`.
- `private_key` (String, Sensitive) Private Key for username+private-key auth. Cannot be used with `password`. Can also be sourced from the `SNOWFLAKE_PRIVATE_KEY` environment variable.
Expand Down
Loading
Loading