https://pulumi.com logo
Title
p

prehistoric-waitress-34998

11/10/2022, 12:56 PM
Hi folks, I’ve been getting a bit of a weird error happening - each time I do a pulumi up in my CI (gitlab), the first time it runs I get an error:
failure Setting LB Security Groups: ValidationError: A security group must be specified
If it run the task again without any changes it completes fine. I’m getting the security group ids from another stack, and passing them into the resource like this:
// Create load balancer to listen for HTTP traffic
    const alb = new awsx.lb.ApplicationLoadBalancer(
      `${name}-alb`,
      {
        securityGroups: args.apiSecurityGroupIds,
        subnets: args.subnetIds,
        vpc,
      },
      {
        parent: this,
      }
    )
Does anyone know why this might be happening? I’ve logged out the inputs and the ids are definitely there each time it runs…
b

billowy-army-68599

11/10/2022, 4:48 PM
which version of awsx are you using?
p

prehistoric-waitress-34998

11/10/2022, 4:49 PM
I’ve got
^5.18.0
in my package.json
b

billowy-army-68599

11/10/2022, 5:01 PM
that’s
aws
, not
awsX
. can you share your
package.json
?
p

prehistoric-waitress-34998

11/10/2022, 7:08 PM
🤦‍♂️ awsx is
^0.40.1
The package json is
{
  "name": "app",
  "main": "index.ts",
  "devDependencies": {
    "@types/node": "^14"
  },
  "dependencies": {
    "@pulumi/aws": "^5.18.0",
    "@pulumi/awsx": "^0.40.1",
    "@pulumi/docker": "^3.5.0",
    "@pulumi/pulumi": "^3.0.0"
  }
}
b

billowy-army-68599

11/10/2022, 7:35 PM
where is
securityGroups: args.apiSecurityGroupIds
created? outside a component?
p

prehistoric-waitress-34998

11/10/2022, 7:36 PM
yep, it’s imported through a stack reference and then passed into the component
b

billowy-army-68599

11/10/2022, 7:44 PM
I wonder if it’s not resolved on the first pass 🤔
p

prehistoric-waitress-34998

11/10/2022, 7:45 PM
yeah I was wondering that - the infra stack that it’s referencing happens a good couple of minutes before the ALB creation…
b

billowy-army-68599

11/10/2022, 8:15 PM
if you have a minimal repro, we should file a bug. I can’t see any immediate issues with it
p

prehistoric-waitress-34998

11/10/2022, 8:42 PM
I’ll see if I can reproduce it with a minimal example this weekend