https://pulumi.com logo
b

billions-lock-73409

12/04/2019, 4:23 PM
Do cross-stack references support json, or is it simply key-val?
I’m referencing a stack that has a key, let’s say “vpc” and then sub keys like the following:
Copy code
"vpc": {
    "id": "vpc-092f0c76e21c925ab",
    "private_subnets": [
      "subnet-0fea5f1a9ec67a767",
      "subnet-0b7e1de9194e05c8b"
    ],
    "public_subnets": [
      "subnet-05d4950a1a9511326",
      "subnet-09b23f3a60d31eae1"
    ]
  }
however from the other project I’ve tried referencing it a variety of ways, infraRef.getOutput(‘vpc’).private_subnets or infraRef.getOutput(‘vpc:private_subnets’)
b

broad-dog-22463

12/04/2019, 4:43 PM
There's an example of using StackReferences here
the networking stack is shared against the DB And application stacks
b

billions-lock-73409

12/04/2019, 5:04 PM
Ok thanks, so basically just keep the outputs as key-value, not key-json
b

broad-dog-22463

12/04/2019, 5:10 PM
correct
b

billions-lock-73409

12/04/2019, 7:01 PM
thanks! 👍