From d5dac6005bf2d44f730e51bdab452fd1b4f1aaff Mon Sep 17 00:00:00 2001 From: Artur Sawicki Date: Tue, 10 Sep 2024 15:06:24 +0200 Subject: [PATCH] fix: Update v0.95.0 migration guide (#3062) Add `snowflake_network_policy_attachment` to the v0.95.0 migration guide --- MIGRATION_GUIDE.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index 22d421a5e7..974e1789f7 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -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.