Hey . I am very new to Pulumi and trying it for th...
# aws
Hey . I am very new to Pulumi and trying it for the 1st time. Really liked it though so far. I am trying to setup ‘aws secrets’ for my
pulumi typescript
project . But instead of exporting like below. I was hoping if i can manage aws key/secret in
and provide it to pulumi config. I could not find any documentation for that.
Copy code
I don’t think you’re able to use env variables. I know you can use the credentials file in ~/.aws/ or you can look at https://www.pulumi.com/docs/intro/cloud-providers/aws/#configuration for other options
👍 1
Thanks this helps. I am reading it from
file using
package and then setting the provider
Copy code
const config = new pulumi.Config(process.env.provider);

const providerOpts: pulumi.ComponentResourceOptions = {
  provider: new aws.Provider('prov', {
    region: <aws.Region>process.env.region,
    accessKey: process.env.accessKey,
    secretKey: process.env.secretKey,
Is there a way to set a default provider programmatically? It seems like i have to keep passing these provider values to every resource i am creating.