bulky-policeman-29913
12/03/2018, 7:58 PMmicroscopic-florist-22719
pulumi config get aws:region
?bulky-policeman-29913
12/03/2018, 7:59 PMimport * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as awsInfra from "@pulumi/aws-infra";
async function main() {
const regions: aws.Region[] = ['us-east-1'];
const networkConfig = regions.map(async (r: aws.Region) => {
const providerName = `${r}-provider`;
const p = new aws.Provider(providerName, { region: r });
console.log(p);
//const azs = await aws.getAvailabilityZones(undefined, { provider: p });
});
}
main();
microscopic-florist-22719
new aws.Provider
?bulky-policeman-29913
12/03/2018, 8:03 PMmicroscopic-florist-22719
r
inside the callback, what is the output?bulky-policeman-29913
12/03/2018, 8:04 PMmicroscopic-florist-22719
bulky-policeman-29913
12/03/2018, 8:06 PM{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: <https://go.microsoft.com/fwlink/?linkid=830387>
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${file}",
"preLaunchTask": "tsc: build - tsconfig.json",
"outFiles": [
"${workspaceFolder}/bin/**/*.js"
]
}
]
}
microscopic-florist-22719
bulky-policeman-29913
12/03/2018, 8:06 PMmicroscopic-florist-22719
bulky-policeman-29913
12/03/2018, 8:07 PMwhite-balloon-205
--inspect
flag through to the node
process.bulky-policeman-29913
12/03/2018, 8:45 PMpulumi
CLI?white-balloon-205
Node.js
program - it expects to be run inside a Node process setup by the Pulumi engine. That is why you get the error about being unabe to connect to the engine, asking whether you are running the pulumi
CLI.