https://pulumi.com logo
#typescript
Title
# typescript
s

salmon-account-74572

08/21/2019, 3:14 PM
How should one handle inter-dependent AWS security groups? I have Security Group A which needs to allow traffic from Security Group B, and Security Group B which needs to allow traffic from Security Group A. Pulumi will error out if I reference group B in an ingress rule for group A before group B is defined. I thought maybe I could use a combination of SecurityGroup and SecurityGroupRule, but it looks like those should not be combined. Thoughts/ideas?
b

boundless-monkey-50243

08/21/2019, 5:40 PM
Define both groups, define all rules as `SecurityGroupRule`s.
s

salmon-account-74572

08/21/2019, 7:07 PM
I was really hoping that wasn't the answer. Thanks.
b

boundless-monkey-50243

08/21/2019, 7:20 PM
Yeah, it's one of those places where you realize that all this stuff is sitting on top of a not-always-great API.
l

limited-rainbow-51650

08/22/2019, 5:37 AM
TF bumped into the same problem in earlier days which was the reason to introduce separate SecurityGroupRule resources. With the Pulumi AWS provider based on the TF AWS provider, they are bound to the same setup.
s

salmon-account-74572

08/23/2019, 2:20 PM
Makes sense, thanks.