This message was deleted.
# general
s
This message was deleted.
w
It appears we do not expose any direct way to get a handle to the default provider from within a Pulumi program - we definitely should - as
aws.Provider.default
or
aws.defaultProvider
. In the meantime, it looks like this is a way you can get to it if you really need it (a little roundabout):
Copy code
import * as aws from "@pulumi/aws";
import * as pulumi from "@pulumi/pulumi";

class Foo extends pulumi.ComponentResource {
    provider?: pulumi.ProviderResource;
    constructor(name: string) {
        super("default:provider", name);
        this.provider = this.getProvider("aws");
    }
}

let foo = new Foo("foo");
export let callerIdentity = aws.getCallerIdentity({ provider: foo.provider });
c
thanks, but in this case I create a new one, easier to understand
👍 1