I don't think this should be inside the `security_groups.map` loop, again, best moved to a helper.