https://pulumi.com logo
#typescript
Title
# typescript
s

sparse-soccer-23105

12/07/2020, 2:26 PM
Hi guys, I would like to retrieve some properties from an aws.Provider(), such as the AccessKey or the SecretKey, in order to inject them to my shell environment. The reason is I'm running some EKS stack in different account from several automation role and I need to have the right "automation-role' credentials injected into my environment in order to reach the K8s API in those different accounts I am creating the aws.Provider() as so :
Copy code
new aws.Provider(
      `${account}-assume-role-${region}`,
      {
        assumeRole: {
          roleArn: `arn:aws:iam::${acc.Id}:role/automation-role`,
          sessionName: "xxxx",
          externalId: "xxxx"
        },
        region
      },
      { version: "2.13.1" }
    );
b

brave-planet-10645

12/07/2020, 4:36 PM
We have a tutorial on how to do this which can be found here. Have a look at that and see if it helps