Hi is there a way to configure a provider? specifi...
# getting-started
g
Hi is there a way to configure a provider? specificall cloudflare? https://www.pulumi.com/docs/reference/pkg/cloudflare/provider/ I'd like to put API token as a secret in pulumi and let it configure itself
b
yeah, you can declare the provider similarly to this and reference it in the "third" parameter to resource creation:
Copy code
const myProvider = new cloudflare.Provider("name",{
  ...
  apiToken: config.requireSecret("secret-token"),
  ...moreconfig..
})

const myThing = new cloudflare.Thing("name", {
  ..config
},{
  provider: myProvider
})
g
Oh I see then I can explicitly pass the provider around! Thanks!