Thread
#python
    b

    big-engineer-71075

    3 months ago
    Hi. I have a question about the difference between
    require
    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?
    f

    few-diamond-68626

    3 months ago
    Hi Solomon, you post just ended half a day of work to try to find a solution.
    So, either this is a FEATURE and the documentation here is wrong (https://www.pulumi.com/docs/intro/concepts/secrets/), or this is a BUG and the documentation is correct.
    b

    big-engineer-71075

    3 months ago
    I think the answer is neither: the documentation seems to be incomplete on this matter.
    f

    few-diamond-68626

    3 months ago