incalculable-sundown-82514
06/20/2018, 5:38 PMpulumi refresh
is the CLI verb that does this. We’ve gone back and forth about whether or not we want to do this automatically when doing an update - do you have any thoughts on that?stocky-spoon-28903
06/20/2018, 5:39 PMstocky-spoon-28903
06/20/2018, 5:39 PMstocky-spoon-28903
06/20/2018, 5:42 PMrefresh
doesn’t really suggest what it will actually do in my reading either:stocky-spoon-28903
06/20/2018, 5:42 PMDo you want to perform this refresh? details
* pulumi:pulumi:Stack: (same)
[urn=urn:pulumi:network::vpc-demo::pulumi:pulumi:Stack::vpc-demo-network]
* privateSubnetIds : [
* [0]: "subnet-ca80eab3"
* [1]: "subnet-3acb5c71"
* [2]: "subnet-ce024294"
]
* vpcDefaultSecurityGroupId: "sg-2cb6875d"
* vpcId : "vpc-31796a48"
~ aws:ec2/vpc:Vpc: (update)
[id=vpc-31796a48]
[urn=urn:pulumi:network::vpc-demo::aws:ec2/vpc:Vpc::demo-vpc]
~ tags : {
~ Name: "Demo Thing" => "Demo Thing XXX"
}
info: 1 change previewed:
~ 1 resource to update
4 resources unchanged
stocky-spoon-28903
06/20/2018, 5:42 PMincalculable-sundown-82514
06/20/2018, 5:42 PMincalculable-sundown-82514
06/20/2018, 5:42 PMstocky-spoon-28903
06/20/2018, 5:43 PM-refresh=false
on terraform plan
stocky-spoon-28903
06/20/2018, 5:43 PMN
reads to the API. I haven’t seen a rate limit problem in a while, but they used to be frequentstocky-spoon-28903
06/20/2018, 5:59 PMadamant-restaurant-73893
06/20/2018, 6:00 PMstocky-spoon-28903
06/20/2018, 6:01 PMstocky-spoon-28903
06/20/2018, 6:07 PMstocky-spoon-28903
06/20/2018, 6:07 PMlet azs = aws.getAvailabilityZones();
const az = async function (index: number) {
return (await azs).names[index];
};
// Access using `az(index)`
powerful-whale-8767
06/20/2018, 6:09 PMimport * as awsinfra from "@pulumi/aws-infra";
let az0 = await awsinfra.getAwsAz(0);
stocky-spoon-28903
06/20/2018, 6:11 PMpowerful-whale-8767
06/20/2018, 6:12 PMasync function
around it to massage it into more useful form seems like a pretty idiomatic approach.stocky-spoon-28903
06/20/2018, 6:13 PMstocky-spoon-28903
06/20/2018, 6:13 PMlet azs = aws.getAvailabilityZones()
outside of a function scope?microscopic-florist-22719
big-soccer-75859
06/20/2018, 6:21 PMendpoint.get('/example', routeHandlerFunc)
does the routeHandlerFunc have an isolated scope or is pulumi smart enough to inject some outer scope?bitter-oil-46081
06/20/2018, 6:23 PMbig-soccer-75859
06/20/2018, 6:24 PMstocky-spoon-28903
06/20/2018, 6:25 PMstocky-spoon-28903
06/20/2018, 6:25 PMindex.ts:10:11 - error TS1308: 'await' expression is only allowed within an async function.
10 let azs = await aws.getAvailabilityZones();
~~~~~
microscopic-florist-22719
microscopic-florist-22719
await
at the top levelmicroscopic-florist-22719
let azs = aws.getAvailabilityZones()
should work, though