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
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
# Changelog

## [0.100.0](https://github.com/Snowflake-Labs/terraform-provider-snowflake/compare/v0.99.0...v0.100.0) (2024-12-12)


### 🎉 **What's new:**

* Account v1 readiness ([#3236](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3236)) ([5df33a8](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/5df33a8c1abe38c29124bac1e03727202c556347))
* Account v1 readiness generated files ([#3242](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3242)) ([3df59dd](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/3df59dd51b53acae9155b732811cfda56d7f20b8))
* Account v1 readiness resource ([#3252](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3252)) ([8f5698d](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/8f5698dbce3325461d572c4029ef2dbc364e819b))
* Add a new account roles data source ([#3257](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3257)) ([b3d6b9e](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/b3d6b9e5b4f327b186161f50dc9ac732d199fb19))
* Add account data source ([#3261](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3261)) ([6087fc9](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/6087fc9fdb2467e022ec7489137e7f5a5fe1ff25))
* Add all other functions and procedures implementations ([#3275](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3275)) ([7a6f68d](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/7a6f68df2fb0a0a4696a5442569344039a839c27))
* Basic functions implementation ([#3269](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3269)) ([6d4a103](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/6d4a10364276e92fa791eaa022c3bd7bce16228d))
* Basic procedures implementation ([#3271](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3271)) ([933335f](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/933335f56d1e53bf3e95d1f552672f35425b4878))
* Docs, test, and missing parameter ([#3280](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3280)) ([10517f3](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/10517f337c6b22d5f7f2a4f6c747b6fd2d2f47e9))
* Functions and procedures schemas and generated sources ([#3262](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3262)) ([9b70f87](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/9b70f872ca799126bc2051b4ed70160f868ac267))
* Functions sdk update ([#3254](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3254)) ([fc1eace](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/fc1eace306e8d919c3349d56480fa3386ca664af))
* Handle missing fields in function and procedure ([#3273](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3273)) ([53e7a0a](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/53e7a0aea3350e9e03a804d67e7df796f15bff3a))
* Procedures schemas and generated sources ([#3263](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3263)) ([211ad46](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/211ad46223f1bdf03b20cc7a06110bfce18a967e))
* Procedures sdk update ([#3255](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3255)) ([682606a](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/682606adea5e40befa7e599ced5aa7dc8570f80a))
* Rework account parameter resource ([#3264](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3264)) ([15aa9c2](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/15aa9c2c94d80ae1d299a333b8035e38de6a6dfc))
* Rework data types ([#3244](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3244)) ([05ada91](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/05ada917414ea7c574be3974c7de4f09535961fd))
* support table data type ([#3274](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3274)) ([13401d5](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/13401d5fff320eedcf40eed7c0831154cc6cc13a))
* Tag association v1 readiness ([#3210](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3210)) ([04f6d54](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/04f6d54a83cf4e9ea4b292087eefa056114eb5b5))
* Test imports and small fixes ([#3276](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3276)) ([a712195](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/a7121952892847f61e24e7a7a4fe78c38a450985))
* Unsafe execute v1 readiness ([#3266](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3266)) ([c4f1e8f](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/c4f1e8fd55150e40d8a556580016ff83fe65bdaf))
* Use new data types in sql builder for functions and procedures ([#3247](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3247)) ([69f677a](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/69f677a6f86faa79cdece4d422eb61284c1599a6))


### 🔧 **Misc**

* Add ShowByID filtering generation ([#3227](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3227)) ([548ec42](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/548ec42ae7bcb8daa038de4cb2f81ced9c028f2d))
* Adress small task-related todos ([#3243](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3243)) ([40de9ae](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/40de9ae93796afbc3091aa2fbb2c5dfba71f911c))
* Apply masking ([#3234](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3234)) ([c209a8a](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/c209a8ae6c15fa9515e933d18add962070b60257))
* fix missing references in toOpts and changes with newlines ([#3240](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3240)) ([246547f](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/246547f8eb13118a325881630f33433b3f5d8f0a))
* function tests ([#3279](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3279)) ([5af6efb](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/5af6efb08c479edbaea54f87f79672c802edcc86))
* Improve config builders ([#3207](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3207)) ([425787c](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/425787c5938e88895af1157f505889611bdef398))
* Revert to proper env ([#3238](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3238)) ([5d4ed3b](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/5d4ed3bc233a77196f01351d9c972bb56730298e))
* Use service user for ci ([#3228](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3228)) ([2fb50d7](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/2fb50d7b5beb1f361d3c761b344bab3216f6ea59))


### 🐛 **Bug fixes:**

* Make blocked_roles_field optional in OAuth security integrations ([#3267](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3267)) ([7197b57](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/7197b57c5dd75be34fc77eb82aabbd091074b809))
* Minor fixes ([#3231](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3231)) ([1863bf6](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/1863bf697f05177f27c351c0687c4bee24fe2c1b))
* Minor fixes 2 ([#3230](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3230)) ([73b7e74](https://github.com/Snowflake-Labs/terraform-provider-snowflake/commit/73b7e74bf44b1ae6ddc78cac752f2b7febb836cd))

## [0.99.0](https://github.com/Snowflake-Labs/terraform-provider-snowflake/compare/v0.98.0...v0.99.0) (2024-11-26)


Expand Down
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
2 changes: 0 additions & 2 deletions docs/data-sources/accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ description: |-
Data source used to get details of filtered accounts. Filtering is aligned with the current possibilities for SHOW ACCOUNTS https://docs.snowflake.com/en/sql-reference/sql/show-accounts query. The results of SHOW are encapsulated in one output collection accounts.
---

!> **Caution: Preview Feature** This feature is considered a preview feature in the provider, regardless of the state of the resource in Snowflake. We do not guarantee its stability. It will be reworked and marked as a stable feature in future releases. Breaking changes are expected, even without bumping the major version. To use this feature, add the relevant feature name to `preview_features_enabled field` in the [provider configuration](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs#schema). Please always refer to the [Getting Help](https://github.com/Snowflake-Labs/terraform-provider-snowflake?tab=readme-ov-file#getting-help) section in our Github repo to best determine how to get help for your questions.

# snowflake_accounts (Data Source)

Data source used to get details of filtered accounts. Filtering is aligned with the current possibilities for [SHOW ACCOUNTS](https://docs.snowflake.com/en/sql-reference/sql/show-accounts) query. The results of SHOW are encapsulated in one output collection `accounts`.
Expand Down
Loading
Loading