Fixed an error on the creation of security groups

The builder was using an old method that was deprecated.