Skip to content

Commit

Permalink
fix: Update v0.95.0 migration guide (#3062)
Browse files Browse the repository at this point in the history
Add `snowflake_network_policy_attachment` to the v0.95.0 migration guide
  • Loading branch information
sfc-gh-asawicki committed Sep 10, 2024
1 parent 1887e55 commit d5dac60
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,17 @@ To migrate, in case of having two resources:
- remove `snowflake_user_public_keys` from state (following https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/docs/technical-documentation/resource_migration.md#resource-migration)
- remove `snowflake_user_public_keys` from config

#### *(breaking change)* snowflake_network_policy_attachment usage with snowflake_user

`snowflake_network_policy_attachment` changes are similar to the changes to `snowflake_user_public_keys` above. It is advised to use `snowflake_network_policy_attachment` only when user is not managed through terraform. Having both resources configured for the same user will result in improper behavior.

To migrate, in case of having two resources:
- copy network policy to [network_policy](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/0.95.0/docs/resources/user#network_policy) attribute in the `snowflake_user` resource
- remove `snowflake_network_policy_attachment` from state (following https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/docs/technical-documentation/resource_migration.md#resource-migration)
- remove `snowflake_network_policy_attachment` from config

References: [#3048](https://github.com/Snowflake-Labs/terraform-provider-snowflake/discussions/3048), [#3058](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3058)

#### *(note)* snowflake_user_password_policy_attachment and other user policies

`snowflake_user_password_policy_attachment` is not addressed in the current version.
Expand Down

0 comments on commit d5dac60

Please sign in to comment.