def create_group(region_or_vpc, ports, sg_cidr_ips = ['0.0.0.0/0'])
      name = group_id(ports)
      @logger.notify("aws-sdk: Creating group #{name} for ports #{ports.to_s}")
      @logger.notify("aws-sdk: Creating group #{name} with CIDR IPs #{sg_cidr_ips.to_s}")
      cl = region_or_vpc.is_a?(String) ? client(region_or_vpc) : client

      params = {
        :description => "Custom Beaker security group for #{ports.to_a}",
        :group_name  => name,
      }

      params[:vpc_id] = region_or_vpc.vpc_id if region_or_vpc.is_a?(Aws::EC2::Types::Vpc)

      group = cl.create_security_group(params)

      unless ports.is_a? Set
        ports = Set.new(ports)
      end

      sg_cidr_ips.each do |cidr_ip|
        ports.each do |port|
          add_ingress_rule(cl, group, cidr_ip, port, port)
        end
      end

      group
    end
def create_group(region_or_vpc, ports, sg_cidr_ips = ['0.0.0.0/0'])
      name = group_id(ports)
      @logger.notify("aws-sdk: Creating group #{name} for ports #{ports.to_s}")
      @logger.notify("aws-sdk: Creating group #{name} with CIDR IPs #{sg_cidr_ips.to_s}")
      cl = region_or_vpc.is_a?(String) ? client(region_or_vpc) : client

      params = {
        :description => "Custom Beaker security group for #{ports.to_a}",
        :group_name  => name,
      }

      params[:vpc_id] = region_or_vpc.vpc_id if region_or_vpc.is_a?(Aws::EC2::Types::Vpc)

      group = cl.create_security_group(params)

      unless ports.is_a? Set
        ports = Set.new(ports)
      end

      sg_cidr_ips.each do |cidr_ip|
        ports.each do |port|
          add_ingress_rule(cl, group, cidr_ip, port, port)
        end
      end

      group
    end
Create a new security group

 Accepts a region or VPC for group creation.

 @param region_or_vpc [Aws::EC2::Region, Aws::EC2::VPC] the AWS region or vpc control object
 @param ports [Array<Number>] an array of port numbers
 @param sg_cidr_ips [Array<String>] CIDRs used for outbound security group rule
 @return [Aws::EC2::SecurityGroup] created security group
 @api private