When we create a new Pulumi Azure project, it will use the default Azure provider and deploy resources into either whatever subscription you have selected in the CLI when you run it or explicitly set the subscription ID using an environment variable it will use that. We don’t need to create a provider object for this; Pulumi does it for us.
If we want to deploy some resources to a second subscription, we need to create a new Pulumi Azure provider in our code that provides details of that subscription. Once we do that, we can then use that provider for our specific resources.
Source: https://samcogan.com/deploying-to-more-than-one-azure-subscription-with-pulumi/
In Python, there's option to provide alternate provider using:
provider = Provider("provider", region="us-west-2")
vpc = ec2.Vpc("vpc", opts=ResourceOptions(provider=provider))
For my particular issue, additional provider can be specified by using:
opts=pulumi.InvokeOptions(provider=provider)
def get_workspace(resource_group_name: Optional[str] = None,
workspace_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetWorkspaceResult
Source: https://www.pulumi.com/docs/intro/concepts/resources/options/provider/