puppetlabs / puppetlabs-postgresql

Puppet module for managing PostgreSQL
Apache License 2.0
228 stars 612 forks source link

Deferred values don't seem to work for postgres_password (aka admin password) #1560

Open barskern opened 8 months ago

barskern commented 8 months ago

Describe the Bug

When passing a Deferred value to the postgres_password parameter I get the following error message:

Failed on [...]:
  Apply failed to compile for [...]: 'postgresql::postgresql_escape' parameter 'input_string' expects a String value, got Deferred (file: /[...]/.modules/postgresql/manifests/server/passwd.pp, line: 28, column: 16)

Expected Behavior

Expected deferred values to work, that is simply setting the value to the deferred value.

Steps to Reproduce

Setup a default instance and run something similar to the below:

class { '::postgresql::server':
    postgres_password => Deferred('unwrap', [$admin_password_vault]),
}

Environment

Additional Context

barskern commented 8 months ago

This seems to have been implemented for role passwords, but not the root password.