trying to use cross-stack references for first tim...
# general
b
trying to use cross-stack references for first time.. I have my VPC stack that has outputs of the subnet IDs:
Copy code
Outputs:
  + public_subnet_ids: [
  +     [0]: "subnet-00c7ed0ec22cb3ce4"
  +     [1]: "subnet-04327ab075a2ae3b3"
    ]
I’m then trying to pass those into an ALB in another stack:
Copy code
const vpc = new pulumi.StackReference(`my-vpc/${env}`);
var alb = new aws.applicationloadbalancing.LoadBalancer(alb_name, {
    name: alb_name,
    subnetMappings: vpc.getOutput("public_subnet_ids"),
    enableCrossZoneLoadBalancing: true,
    enableHttp2: true
});
and getting this:
Copy code
Diagnostics:
  aws:applicationloadbalancing:LoadBalancer (myapp-alb-stage-alb-main):
    error: aws:applicationloadbalancing/loadBalancer:LoadBalancer resource 'myapp-alb-stage-alb-main' has a problem: subnet_mapping.0: expected object, got string
    error: aws:applicationloadbalancing/loadBalancer:LoadBalancer resource 'myapp-alb-stage-alb-main' has a problem: subnet_mapping.1: expected object, got string
seems like an Output/String/Promise issue but not sure what I’m doing wrong here