Skip to content
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

CustomizeDiff Computed on password if password_resest change #561

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

lpatte
Copy link
Contributor

@lpatte lpatte commented Feb 26, 2024

Description

Add a CustomizeDiff ComputedIf for password in all database user resource to ling the password attribute with the password_resest attribute.
With this, if password_resest change, the field password will be show as recomputed in the Plan.
So any other resource that use this password field will know that they must update something.

Fixes #559

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Test Configuration:

  • Existing HCL configuration you used:
resource "ovh_cloud_project_database_postgresql_user" "user" {
  service_name     = "xxxxx"
  cluster_id            = "xxxxx"
  name                   = "testname"
  password_reset  = "reset1"
}

output "user_password" {
  value     = ovh_cloud_project_database_postgresql_user.user.password
  sensitive = true
}

Then update password_reset, I can see plan show update on password_reset and password.
Also user_password output is now automatically

@lpatte lpatte changed the title CustomDiff Computed on password if password_resest change CustomizeDiff Computed on password if password_resest change Feb 26, 2024
@amstuta amstuta merged commit 1a6fb86 into master Feb 28, 2024
@mig4ng
Copy link

mig4ng commented Feb 28, 2024

Thank you for fixing this quickly @amstuta !

I will give it a test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants