Welcome to mirror list, hosted at ThFree Co, Russian Federation.

check_gcp_project_billing_service.rb « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ea82b61b279710312671a3da7f04bf7c0f84c678 (plain)
1
2
3
4
5
6
7
8
9
10
11
class CheckGcpProjectBillingService
  def execute(token)
    client = GoogleApi::CloudPlatform::Client.new(token, nil)
    client.projects_list.select do |project|
      begin
        client.projects_get_billing_info(project.project_id).billing_enabled
      rescue
      end
    end
  end
end