Is it possible to add a security group ID as the source for an ingress rule? See example below:
privateSecurityGroup.addIngressRule(new ec2.SecurityGroupId(publicSecurityGroup.securityGroupId), new ec2.TcpPort(22), 'Ingress SSH from public sg');
I believe the following should work:
privateSecurityGroup.connections.allowFrom(publicSecurityGroup, new ec2.TcpPort(22), 'Ingress SSH from public sg');
@rix0rrr thank you for this!
Did it work?
Most helpful comment
I believe the following should work: