https://pulumi.com logo
#typescript
Title
# typescript
s

swift-postman-59572

06/22/2019, 12:16 AM
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

white-balloon-205

06/22/2019, 3:47 PM
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

swift-postman-59572

06/22/2019, 10:25 PM
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!