Hey can someone help me with awsx, trying to creat...
# aws
m
Hey can someone help me with awsx, trying to create an SecurityGroupRule using another security group as location
Copy code
SecurityGroupRule.ingress("http", 
                          appsg, 
                          lbsg,
                          new awsx.ec2.TcpPorts(80));
I'm getting "Type 'SecurityGroup' has no properties in common with type 'SecurityGroupRuleLocation'."
from what i understand i need to create a SecurityGroupRuleLocation or something like that.
g
Yep, here's an example:
Copy code
const client = new awsx.ec2.SecurityGroup(`client`, { vpc });

const server = new awsx.ec2.SecurityGroup(`server`, { vpc });
awsx.ec2.SecurityGroupRule.ingress("https-access", server,
    { sourceSecurityGroupId: client.id },
    new awsx.ec2.TcpPorts(443),
    "allow https access");
m
Thanks