Hello! I was wondering if anyone has created an EC...
# typescript
s
Hello! I was wondering if anyone has created an ECS cluster that is placed inside an existing security group. This is what I'm currently work with and it's complaining that I'm passing a string and not a type of awsx.ec2.securityGroupOrId[]
Copy code
const config = new pulumi.Config();
const existingSecurityGroup = config.require('existingSG');
const cluster = new awsx.ecs.Cluster(`app-${env}`, {
  securityGroups: [existingSecurityGroup],
  vpc: vpc,
  name: `app-${env}`
});
w
I believe that a security group of string is a valid thing to pass for
SecurityGroupOrId
. Could you share the exact error? Is that for the exact code above?
See also https://pulumi.io/reference/pkg/nodejs/pulumi/awsx/ec2/#SecurityGroupOrId which indicates that a string should be valid here.
s
Hi Luke, thanks for the reply! I figured out the issue... When I copied over my security group id into my pulumi config, I missed the last number. I put in the full security group id and it's working now!