Hi folks, I’ve been getting a bit of a weird error...
# general
p
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:
Copy code
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:
Copy code
// 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
which version of awsx are you using?
p
I’ve got
^5.18.0
in my package.json
b
that’s
aws
, not
awsX
. can you share your
package.json
?
p
🤦‍♂️ awsx is
^0.40.1
The package json is
Copy code
{
  "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
where is
securityGroups: args.apiSecurityGroupIds
created? outside a component?
p
yep, it’s imported through a stack reference and then passed into the component
b
I wonder if it’s not resolved on the first pass 🤔
p
yeah I was wondering that - the infra stack that it’s referencing happens a good couple of minutes before the ALB creation…
b
if you have a minimal repro, we should file a bug. I can’t see any immediate issues with it
p
I’ll see if I can reproduce it with a minimal example this weekend