big-engineer-71075
06/17/2022, 2:42 PMrequire
and require_secret
:
I need to run a query against a database to determine what needs to be done in the rest of the pulumi script. I want to store the password for the database connection as a secret (pulumi config set --secret db_password ...
). I notice that if I set a config value with --secret
and then retrieve it with require_secret
, I can't use the returned object to connect to the database, I get a type error:
TypeError: <pulumi.output.Output object at 0x10feb3df0> has type Output, but expected one of: bytes, unicode
But if I retrieve the value using just require
, then it works fine. So I'm a little confused about why I would use require_secret
instead of require
. What's the difference? What's going on here?few-diamond-68626
06/20/2022, 2:30 PMbig-engineer-71075
06/20/2022, 2:39 PMfew-diamond-68626
06/20/2022, 2:39 PM