def create_ping_group(region_or_vpc, sg_cidr_ips = ['0.0.0.0/0'])
      @logger.notify("aws-sdk: Creating group #{PING_SECURITY_GROUP_NAME}")
      cl = region_or_vpc.is_a?(String) ? client(region_or_vpc) : client

      params = {
        :description => 'Custom Beaker security group to enable ping',
        :group_name  => PING_SECURITY_GROUP_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)

      sg_cidr_ips.each do |cidr_ip|
        add_ingress_rule(
          cl,
          group,
          cidr_ip,
          '8', # 8 == ICMPv4 ECHO request
          '-1', # -1 == All ICMP codes
          'icmp',
        )
      end

      group
    end
def create_ping_group(region_or_vpc, sg_cidr_ips = ['0.0.0.0/0'])
      @logger.notify("aws-sdk: Creating group #{PING_SECURITY_GROUP_NAME}")
      cl = region_or_vpc.is_a?(String) ? client(region_or_vpc) : client

      params = {
        :description => 'Custom Beaker security group to enable ping',
        :group_name  => PING_SECURITY_GROUP_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)

      sg_cidr_ips.each do |cidr_ip|
        add_ingress_rule(
          cl,
          group,
          cidr_ip,
          '8', # 8 == ICMPv4 ECHO request
          '-1', # -1 == All ICMP codes
          'icmp',
        )
      end

      group
    end
Create a new ping enabled 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 sg_cidr_ips [Array<String>] CIDRs used for outbound security group rule
 @return [Aws::EC2::SecurityGroup] created security group
 @api private