https://pulumi.com logo
Title
b

bumpy-laptop-30846

04/28/2021, 4:24 PM
Hi guys, I have an issue with postgresql as the setup must be passed through the pulumi config or an env variable. My issue is that the values to pass come from my pulumi program. So how can I pass my endpoint + credentials to the postgresql provider inside my program?
b

bored-oyster-3147

04/28/2021, 5:12 PM
Can you provide more context? Is this an issue because you are deriving from Pulumi.Stack and can't access the information you need inside the constructor?
b

bumpy-laptop-30846

04/28/2021, 5:21 PM
It’s not available in the credentials. I don’t see them here. So the only way is through config or env var? So must be fed from outside the program ?
b

bored-oyster-3147

04/28/2021, 5:26 PM
ah ok I think I misunderstood the original question. It looks like the database resource takes in a
owner
input, which can be set to a role. So maybe they want you to set up a role? https://www.pulumi.com/docs/reference/pkg/postgresql/role/ It looks like the role resource allows credential configuration
Also the provider takes in credentials as inputs: https://www.pulumi.com/docs/reference/pkg/postgresql/provider/ I might still be misunderstanding the question
b

bumpy-laptop-30846

04/28/2021, 5:30 PM
ok cool thanks, it answers my question 🙂
🙌 1