https://pulumi.com logo
#general
Title
# general
r

red-park-89481

12/04/2023, 8:17 PM
I'm working with the Github provider & trying to build a stack that manages all of our https://www.pulumi.com/registry/packages/github/api-docs/enterpriseorganization/ resources from a single stack. In terraform I can just about manage this with explicit provider blocks in the org module & passing in a slug to be used in each instance of the provider. In pulumi, the org is set via
GITHUB_OWNER
or
pulumi config set github:owner YYYYYYYYYYYYYY
, is there a way to do this from inside a pulumi stack?
b

billowy-army-68599

12/04/2023, 8:20 PM
you can use the pulumi config set method, is that not working?
each time you do a config set, it’s set at the stack level
r

red-park-89481

12/04/2023, 9:24 PM
I didn't know there was a config set method, https://www.pulumi.com/docs/concepts/config/#code only shows Get & Require, am I looking in the wrong place?
b

billowy-army-68599

12/04/2023, 9:24 PM
i’m perhaps confused by what you’re trying to do
r

red-park-89481

12/04/2023, 9:28 PM
imagine we have a map of github orgs we want configured in a particular way, from a single stack, and each org should have a repo called admin, when pulumi creates the repo it will do it in the org that created the PAT or the org set via
pulumi config set github:owner YYYYYYYYYYYYYY
, but I can only set that once for the stack.
b

billowy-army-68599

12/04/2023, 9:29 PM
so you want to target different github org inside a single stack?
r

red-park-89481

12/04/2023, 9:29 PM
yeah
b

billowy-army-68599

12/04/2023, 9:29 PM
r

red-park-89481

12/04/2023, 9:30 PM
ah!!! Thank you!
beer['ghent']++
😉