what is the usage for a security group ingress rul...
# general
b
what is the usage for a security group ingress rule "sourceSecurityGroupId" property?
Copy code
app_sg.createIngressRule("app_allow_edge_in", {    
    location: { sourceSecurityGroupId: edge_sg.id },
    ports: new awsx.ec2.AllTcpPorts(),
    description: "allow HTTP access from anywhere",
});
This works -- but this doesn't: (doesn't compile)
Copy code
app_sg.createIngressRule("app_allow_edge_in", {    
    sourceSecurityGroupId: edge_sg.id,
    ports: new awsx.ec2.AllTcpPorts(),
    description: "allow HTTP access from anywhere",
});
error:
Copy code
No overload matches this call.
  Overload 1 of 2, '(name: string, args: SimpleSecurityGroupRuleArgs, opts?: ComponentResourceOptions | undefined): IngressSecurityGroupRule', gave the following error.
    Argument of type '{ sourceSecurityGroupId: Output<string>; toPort: awsx.ec2.AllTcpPorts; fromPort: awsx.ec2.AllTcpPorts; protocol: string; description: string; }' is not assignable to parameter of type 'SimpleSecurityGroupRuleArgs'.
      Object literal may only specify known properties, and 'sourceSecurityGroupId' does not exist in type 'SimpleSecurityGroupRuleArgs'.ts(2769)
l
What is "SimpleSecurityGroupRuleArgs"? I can see SecurityGroupRuleArgs in pulumi-aws, but not "Simple...".
Ah found it in Crosswalk. I think your code will work if you use the Pulumi security group under the Crosswalk one.
Use the
location
variant with Crosswalk.
b
Got it -- thanks Paul