-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Failed apply to a snowflake_user password will still update the state of the user's password #2970
Comments
Hey @jsnb-devoted. Thanks for reaching out to us. We are currently reworking user resource. I will check the reproduction steps in one of my PRs and let you know. |
Fix known user resource-connected issues: - Change the sensitiveness of name and login_name (References: #2662 #2668) - Handle "null" properly for the nullable bool text attributes in user (References: #2817) - Fix diff suppression for default_x in user resource (References: #2836) - Update the migration guide (References #2938 #2942) - Fix incorrect state after failed to alter (References #2970) - Confirm the problem with the computed disabled attribute (References #1572) - Confirm that the problem with the null-out password was already solved (References #1535) - Add TODO to handle days to expiry in user (References #1155) The next 2 PRs will contain: - adjusting user resource to our rework conventions (also adding additional fields and handling #1155 and #1572) - adjusting user datasource (will handle #2902) User rework will not include handling new types of users (service, legacy service); this will be done a bit later.
Hey @jsnb-devoted, the fix was included in #3013 and will be released in v0.95.0 today or tomorrow (we have to wrap up a few other PRs before making a release). Please check the migration guide and report any problems. |
Hey @jsnb-devoted. |
Closing the issue due to inactivity. Please create a new one if the issue persists in the newest version of the provider. |
Terraform CLI Version
1.8.1
Terraform Provider Version
0.92.0
Terraform Configuration
Category
category:resource
Object type(s)
resource:user
Expected Behavior
I had a plan that was meant to update a password and add a public key:
That failed because the public key had the header and footer:
I checked the query history log and found the failed
ALTER USER
statement as expected however the state must have indicated that the password had been updated when in fact it was still the old password:Actual Behavior
If an apply for the
snowflake_user
resource then I would expect TF to not update the state such that it produces the same diff on the subsequent plan.Steps to Reproduce
Update password and public key values in the snowflake user resource. Provide an invalid public key such that Snowflake will reject the ALTER statement (one option is to include the header/footer). Plan/Apply - confirm that the apply fails. Run another plan and confirm that the snowflake user does not provide a diff despite the password being difference in the state.
How much impact is this issue causing?
Low
Logs
No response
Additional Information
No response
Would you like to implement a fix?
The text was updated successfully, but these errors were encountered: