Ankurdeewan commented on code in PR #56324:
URL: https://github.com/apache/airflow/pull/56324#discussion_r3068164327


##########
providers/google/docs/connections/gcp.rst:
##########
@@ -309,3 +325,74 @@ Note that as domain-wide delegation is currently supported 
by most of the Google
 * All of Google Cloud operators and hooks.
 * Firebase hooks.
 * All transfer operators that involve Google cloud in different providers, for 
example: 
:class:`airflow.providers.amazon.aws.transfers.gcs_to_s3.GCSToS3Operator`.
+
+
+Quota Project Support
+---------------------
+
+Airflow's Google Cloud providers support specifying a "quota project" (a 
billing project) for
+API calls. That lets API usage be billed to a different Google Cloud project 
than the one that
+owns the service account. This is useful for organizations that share service 
accounts but
+centralize billing in specific projects.
+
+Usage
+~~~~~
+
+There are two ways to set a quota project in Airflow:
+
+- Via connection extras (recommended for environment-wide defaults).
+- Directly on operators or hooks (recommended when a single task must bill to 
a different project).
+
+Connection extras
+^^^^^^^^^^^^^^^^^
+
+Add the quota project ID to the Google Cloud connection extras. For example:
+
+.. code-block:: json
+
+  {
+    "quota_project_id": "your-billing-project-id"
+  }
+
+You can set this via the Airflow UI, the Connections REST API, or an 
environment variable, for
+example:
+
+.. code-block:: bash
+
+  export AIRFLOW_CONN_GOOGLE_CLOUD_DEFAULT='{
+    "conn_type": "google-cloud-platform",
+    "extra": {
+      "quota_project_id": "your-billing-project-id"
+    }
+  }'

Review Comment:
   Airflow supports both URI and JSON formats for AIRFLOW_CONN_* env vars 
(since 2.3), so the JSON example is intentional and consistent with how 
gcp.rst. THat said, our example had "conn_type": "google-cloud-platform" with a 
hyphen, which should be "google_cloud_platform" with underscores; fixed that.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to