Skip to content
This repository has been archived by the owner on Nov 14, 2020. It is now read-only.

Updating a role password doesn't actually update the role password #16

Closed
tomelliff opened this issue Aug 2, 2017 · 3 comments · Fixed by #54
Closed

Updating a role password doesn't actually update the role password #16

tomelliff opened this issue Aug 2, 2017 · 3 comments · Fixed by #54
Labels

Comments

@tomelliff
Copy link
Contributor

When updating a role password a plan shows a change:

~ postgresql_role.app
    password: "<sensitive>" => "<sensitive>" (attribute changed)

but after applying the change it doesn't actually appear to have been changed.

Taking a quick look at the source code I don't see anything for updating the role password so I guess it just hasn't been implemented yet?

Terraform Version

Terraform v0.9.11

Terraform Configuration Files

resource "postgresql_role" "app" {
  name     = "app"
  login    = true
  password = "my_password"
}

Expected Behavior

The role password should be changed or at the least an error saying you can't change the role password.

Actual Behavior

Nothing.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
  2. Change the password to something else
  3. terraform apply
  4. Try to login with new password and see it fail
  5. Login with old password and it succeeds
@vascop
Copy link
Contributor

vascop commented Sep 18, 2017

Related to this issue, all passwords are reported as changing after importing, even if they're the same as the existing ones. After applying, they get reported as changed although nothing changed. Makes for a fun moment when importing live production databases.

@sean-
Copy link
Contributor

sean- commented Jan 19, 2018

Internally the PostgreSQL provider needs to emulate the password SHA and store the value. This has been on my list of things to get around to but I haven't had a chance to work on this in a few months. I'm hoping sometime in February I'll be able to get back to some of this and flesh out a few more resources.

@ahartma1
Copy link

ahartma1 commented Jun 4, 2018

Any update on this? I find that no matter whether im setting the password initially or changing it, neither works

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