def ensure_ping_group(vpc, sg_cidr_ips = ['0.0.0.0/0'])
      @logger.notify("aws-sdk: Ensure security group exists that enables ping, create if not")

      group = client.describe_security_groups(
        :filters => [
          { :name => 'group-name', :values => [PING_SECURITY_GROUP_NAME] },
          { :name => 'vpc-id', :values => [vpc.vpc_id] },
        ]
      ).security_groups.first

      if group.nil?
        group = create_ping_group(vpc, sg_cidr_ips)
      end

      group
    end
def ensure_ping_group(vpc, sg_cidr_ips = ['0.0.0.0/0'])
      @logger.notify("aws-sdk: Ensure security group exists that enables ping, create if not")

      group = client.describe_security_groups(
        :filters => [
          { :name => 'group-name', :values => [PING_SECURITY_GROUP_NAME] },
          { :name => 'vpc-id', :values => [vpc.vpc_id] },
        ]
      ).security_groups.first

      if group.nil?
        group = create_ping_group(vpc, sg_cidr_ips)
      end

      group
    end
Return an existing group, or create new one

 Accepts a VPC as input for checking & creation.

 @param vpc [Aws::EC2::VPC] the AWS 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