https://pulumi.com logo
w

worried-dress-4788

09/13/2023, 2:23 PM
Is there a way to access the provider’s settings in a custom
pulumi.ComponentResource
other than trying to access the config files? I need to deploy some azure-native ressources with needs to reference the
subscription_id
in some parameters and don’t know how to do it cleanly and compatible with an explicit provider config.
b

billowy-army-68599

09/13/2023, 3:09 PM
have you parented the resources to the component?
w

worried-dress-4788

09/13/2023, 3:15 PM
Yes, the problem is not directly the provider but I need part of it’s configuration to forge a string to pass as one of the argument of the ressource
b

billowy-army-68599

09/13/2023, 3:16 PM
Ah I see. Wouldn’t you just use something like this? https://www.pulumi.com/registry/packages/azure/api-docs/core/getsubscription/
w

worried-dress-4788

09/13/2023, 3:18 PM
That would work, didn’t think to check the
azure
provider as I’m using the azure-native one
b

billowy-army-68599

09/13/2023, 3:21 PM
w

worried-dress-4788

09/13/2023, 3:34 PM
that’s unfortunately not the same “subscriptions”
b

billowy-army-68599

09/13/2023, 3:42 PM
ah yes, apologies.
w

worried-dress-4788

09/13/2023, 4:06 PM