proud-pizza-80589
09/29/2020, 9:47 AMconst provider = new aws.Provider(`aws`, {
region: location,
});
const cluster = new eks.Cluster(
name,
{
skipDefaultNodeGroup: true,
vpcId: vpc.id,
publicSubnetIds: vpc.publicSubnetIds,
privateSubnetIds: vpc.privateSubnetIds,
instanceRoles: [role],
name,
},
{ provider: this.provider }
);
But as far as I can tell, it does not listen to the env vars any more so i have to hardcode in the credentials or fetcht hem myself out or process.env.steep-angle-29984
09/29/2020, 10:01 AMcool-fireman-90027
09/29/2020, 2:13 PMlet aws = require("@pulumi/aws");
// Create an AWS provider for the us-east-2 region.
let useast2 = new aws.Provider("useast2", { region: "us-east-2" });
Then where you have this:
{ provider: this.provider }
you can do this:
{ providers: {aws: useast2} }
replace useast2 with eu-west-1
https://www.pulumi.com/docs/intro/concepts/programming-model/#explicit-provider-configuration
Can you try that and let us know?proud-pizza-80589
09/29/2020, 2:18 PMconst regionProvider = new aws.Provider(location, {
region: location,
});
const vpc = new awsx.ec2.Vpc(
name,
{
cidrBlock: '172.16.0.0/16',
tags: { Name: name },
},
{ provider: { aws: regionProvider } }
);
error:
Type '{ aws: aws.Provider; }' is not assignable to type 'ProviderResource'.
Object literal may only specify known properties, and 'aws' does not exist in type 'ProviderResource'.
location: aws.Region,
which is a stringcool-fireman-90027
09/29/2020, 2:30 PMregion: location
in the const regionProvider section
to:
region: "eu-west-1"
or update the variable for location to:
const location = "eu-west-1"proud-pizza-80589
09/29/2020, 2:55 PMproviderCredentialOpts: {
profileName: location,
},
cool-fireman-90027
09/29/2020, 3:11 PMproud-pizza-80589
09/29/2020, 3:11 PM