Skip to content

Commit

Permalink
Add migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jcieslak committed Oct 27, 2023
1 parent 7a29cec commit d5c2f44
Showing 1 changed file with 87 additions and 1 deletion.
88 changes: 87 additions & 1 deletion MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,89 @@
# Migration guide

Here you can find migration guides for
This document is meant to help you migrate your Terraform config to new newest version. In migration guides we will only
describe deprecations or breaking changes and help you to change your configuration to keep the same (or similar) behaviour
across different versions.

## v0.73.0 ➞ v0.74.0
### Provider configuration changes

In this change we have done a provider refactor to make it more complete and customizable by supporting more options that
were already available in Golang Snowflake driver. This lead to several attributes being added and a few deprecated.
We will focus on the deprecated ones and show you how to adapt your current configuration to the new changes.

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

```terraform
provider "snowflake" {
# before
username = "username"
# after
user = "username"
}
```

#### *(structural change)* OAuth API
```terraform
provider "snowflake" {
# before
browser_auth = false
oauth_access_token = "<access_token>"
oauth_refresh_token = "<refresh_token>"
oauth_client_id = "<client_id>"
oauth_client_secret = "<client_secret>"
oauth_endpoint = "<endpoint>"
oauth_redirect_url = "<redirect_uri>"
# after
authenticator = "ExternalBrowser"
token = "<access_token>"
token_accessor {
refresh_token = "<refresh_token>"
client_id = "<client_id>"
client_secret = "<client_secret>"
token_endpoint = "<endpoint>"
redirect_uri = "<redirect_uri>"
}
}
```

#### *(remove redundant information)* region

Specifying a region is a legacy thing and according to https://docs.snowflake.com/en/user-guide/admin-account-identifier
you can specify a region as a part of account parameter. Specifying account parameter with the region is also condiered legacy,
but with this approach it will be easier to convert only your account identifier to the new preferred way of specifying account identifier.

```terraform
provider "snowflake" {
# before
region = "<cloud_region_id>"
# after
account = "<account_locator>.<cloud_region_id>"
}
```

#### *(todo)* private key path


```terraform
provider "snowflake" {
# before
private_key_path = "<filepath>"
# after
private_key = file("<filepath>")
}
```

#### *(rename)* session_params ➞ params
```terraform
provider "snowflake" {
# before
session_params = {}
# after
params = {}
}
```

0 comments on commit d5c2f44

Please sign in to comment.