https://pulumi.com logo
#general
Title
# general
b

best-lifeguard-91445

05/13/2020, 9:41 PM
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

little-cartoon-10569

05/13/2020, 10:00 PM
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

best-lifeguard-91445

05/13/2020, 10:12 PM
Got it -- thanks Paul
6 Views