Is there a way to reference the default ResourceOptions or InvokeOptions this would create via a variable without having to define an entirely new ResourceOptions variable? Or maybe just be able to reference the default provider?
s
stocky-restaurant-98004
04/24/2025, 2:56 PM
aws.config.region
will get you the default provider region. Or, you can access like this:
Copy code
const config = new pulumi.Config("aws");
const defaultRegion = config.get("region"); // config.require() if it has to be there.
s
sparse-library-18327
04/24/2025, 6:55 PM
I think what I'm looking for is this option to disable the default provider entirely and then I'll just use the same config points from the config file to create a custom provider and then refer to it as a variable.
Copy code
pulumi:disable-default-providers:
- aws
s
stocky-restaurant-98004
04/24/2025, 6:59 PM
Yes - if you never want to use the system config so that you accidentally deploy to the wrong account or region, that's a good way to ensure that outcome.
h
high-painter-73966
04/28/2025, 1:46 PM
I disable the default providers like you mention. In my core account, I create new accounts for our tenants and then I use this code to get a provider to use for tenant stacks.
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.