User network policy attachments and migration to v0.95 #3048
-
Hi, I want to migrate to v0.95.0 provider version but I have a question about network policy attachments. Before v0.95, I attached network policies to users using the Since v0.95, there is a new The migration guide about this :
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Hey @ppo-38. Yes, I will update the migration guide, because this is not clear there. Essentially, this resource should be treated similarly to
We will most likely leave the resource for situations where user creation is not managed through Terraform (to leave an option to assign network policies if needed). |
Beta Was this translation helpful? Give feedback.
-
Hey @sfc-gh-asawicki, thank you for your answer. So I will also remove |
Beta Was this translation helpful? Give feedback.
-
Hey. This is expected behavior originating from how the Snowflake parameter hierarchies work. We wanted to have the same behavior on the provider side (check more here, here, and here). It is also the reason why |
Beta Was this translation helpful? Give feedback.
-
I had a need to attach a network policy to some user accounts today and stumbled on to this GitHub issue for a similar reason as the author. It wasn't clear to me if I should use the The migration guide linked above makes it clear which one you should use: But that tidbit is likely only helpful if you're migrating an existing setup from an older provider version to a newer provider version and thus you are reading the migration guide. If you're already on the new version and you're setting up a network policy -> user attachment from scratch and just reading the docs, it won't be clear to you which one you should use. It would be helpful if the standard docs provided guidance on this. |
Beta Was this translation helpful? Give feedback.
Hey @ppo-38. Yes, I will update the migration guide, because this is not clear there.
Essentially, this resource should be treated similarly to
snowflake_user_public_key
(which is mentioned in the migration guide here: https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/MIGRATION_GUIDE.md#breaking-change-snowflake_user_public_keys-usage-with-snowflake_user). There are two differences, though:W…