I'm running a `awsx.ec2.Vpc.fromExistingIds` and i...
# general
I'm running a
and it works as expected in a different project.
Copy code
Error: invocation of aws:ec2/getVpc:getVpc returned an error: invoking aws:ec2/getVpc:getVpc: no matching VPC found
Is there a flag or something I'm missing? The VPC id definitely exists.
Only thing I can think of is that you are somehow in a different account? Are you passing explicit provider information to either of the calls? Have you passed the same configuration into both stacks for the AWS role/account to use?
I'm just using the account setup from the shell. When I do
sts get-caller-identity
it is set up properly.
How can I log the current aws role/account used by Pulumi?
You can do something like:
the logged ID looks exactly right, and the vpcId I'm using looks right. Here's the code:
Copy code
const vpcId = tentacleConfig.require("vpcId");
console.log("vpcId: "+vpcId);
export const vpc = awsx.ec2.Vpc.fromExistingIds("tentacle-vpc", {
  vpcId: vpcId,
I thought I had the syntax wrong, but the same code in another project works okay
Pretty hard to tell for sure - seems it almost has to be that somehow you are using a different account. To debug further - you could run
TF_LOG=TRACE pulumi up --debug
(and may need to pipe that output to a file as it will be quite verbose). You can then see the exact calls being made to AWS.
I see the
and it has the exact same
that I'm using in the config... 😕
Although, I do see an earlier call with an empty
, but later calls with it filled in