Skip to content

Commit

Permalink
Add migration guide and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-asawicki committed Nov 8, 2024
1 parent 16fca6b commit 1f0c231
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,18 @@ Note: Because [bcr 2024_07](https://docs.snowflake.com/en/release-notes/bcr-bund

Connected issues: [#3125](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3125)

### *(bugfix)* Handle user import correctly

#### Context before the change

Password is empty after the `snowflake_user` import; we can't read it from the config or from Snowflake.
During the next terraform plan+apply it's updated to the "same" value.
It results in an error on Snowflake side: `New password rejected by current password policy. Reason: 'PRIOR_USE'.`

#### After the change

The error will be ignored on the provider side (after all, it means that the password in state is the same as on Snowflake side). Still, plan+apply is needed after importing user.

## v0.96.0 ➞ v0.97.0

### *(new feature)* snowflake_stream_on_table, snowflake_stream_on_external_table resource
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/legacy_service_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -1011,3 +1011,5 @@ Import is supported using the following syntax:
```shell
terraform import snowflake_legacy_service_user.example '"<user_name>"'
```

Note: terraform plan+apply may be needed after successful import to fill out all the missing fields (like `password`) in state.
2 changes: 2 additions & 0 deletions docs/resources/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -1021,3 +1021,5 @@ Import is supported using the following syntax:
```shell
terraform import snowflake_user.example '"<user_name>"'
```

Note: terraform plan+apply may be needed after successful import to fill out all the missing fields (like `password`) in state.
2 changes: 2 additions & 0 deletions templates/resources/legacy_service_user.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ Import is supported using the following syntax:

{{ codefile "shell" (printf "examples/resources/%s/import.sh" .Name)}}
{{- end }}

Note: terraform plan+apply may be needed after successful import to fill out all the missing fields (like `password`) in state.
2 changes: 2 additions & 0 deletions templates/resources/user.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ Import is supported using the following syntax:

{{ codefile "shell" (printf "examples/resources/%s/import.sh" .Name)}}
{{- end }}

Note: terraform plan+apply may be needed after successful import to fill out all the missing fields (like `password`) in state.

0 comments on commit 1f0c231

Please sign in to comment.