https://pulumi.com logo
#aws
Title
m

miniature-microphone-92266

12/23/2019, 4:13 PM
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

gentle-diamond-70147

12/23/2019, 5:50 PM
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

miniature-microphone-92266

12/23/2019, 7:20 PM
Thanks