I knew we can do stack reference in the same aws a...
# typescript
q
I knew we can do stack reference in the same aws account like this:
Copy code
import * as pulumi from "@pulumi/pulumi";
const current_stack = pulumi.getStack(); // assume current_stack deployed into account A
const infra_stack = new pulumi.StackReference(`acmecorp/infra/${current_stack}`);  // assume infra_stack also deployed into account A
But is there a way to do stackreference across aws accounts ?
Copy code
import * as pulumi from "@pulumi/pulumi";
const current_stack = pulumi.getStack();  // assume current_stack deployed into account A
const infra_stack = new pulumi.StackReference(`acmecorp/infra/${current_stack}`); // assume infra_stack deployed into account B, does this really work ?
Thanks.
w
It should be no problem to reference stacks which deploy resources to different AWS accounts - but at least currently i believe they must be deployed to the same Pulumi organization.
👍 1