Skip to content

add ephemeral password option #551

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

haydn-j-evans
Copy link

@haydn-j-evans haydn-j-evans commented Jun 14, 2025

This PR introduces the ability to use a write_only password, which does not save the password in the state.

See https://developer.hashicorp.com/terraform/language/resources/ephemeral/write-only for more infomation.

We have two new fields for this feature

password_wo - conflicts with password, when set this will be used to update the password of the role during apply, and will clear the password state.

password_wo_version - an optional field that controls when the role password is updated when password_wo is set. When unset, the role password is updated on every apply regardless on the stored value.

Will close issues #532 & #519

@haydn-j-evans haydn-j-evans force-pushed the feature/ephremal-resources branch 2 times, most recently from 1cf812d to 0b8c9eb Compare June 15, 2025 20:31
This commit introduces a `password_wo` attribute to the
`postgresql_role` resource.

This attribute allows setting a role's password without storing
it in the Terraform state, providing improved security by preventing
sensitive credentials from being persisted. The password can also be set without encryption.
@haydn-j-evans haydn-j-evans force-pushed the feature/ephremal-resources branch from 0b8c9eb to a8a4a3a Compare June 16, 2025 07:53
@haydn-j-evans haydn-j-evans marked this pull request as ready for review June 16, 2025 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant