瀏覽代碼

fix for gcp billing

AjayTripathy 7 年之前
父節點
當前提交
c1813c6425
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      cloud/gcpprovider.go

+ 5 - 1
cloud/gcpprovider.go

@@ -178,8 +178,12 @@ func (gcp *GCP) ExternalAllocations(start string, end string, aggregator string)
 
 // QuerySQL should query BigQuery for billing data for out of cluster costs.
 func (gcp *GCP) QuerySQL(query string) ([]*OutOfClusterAllocation, error) {
+	c, err := GetDefaultPricingData("gcp.json")
+	if err != nil {
+		return nil, err
+	}
 	ctx := context.Background()
-	client, err := bigquery.NewClient(ctx, gcp.ProjectID) // For example, "guestbook-227502"
+	client, err := bigquery.NewClient(ctx, c.ProjectID) // For example, "guestbook-227502"
 	if err != nil {
 		return nil, err
 	}