gcp-pipeline-resource-provisioning
Automates declarative resource creation and provisioning for data pipelines, supporting BigQuery, Dataform, Dataproc, BigQuery Data Transfer Service (DTS), and other resources. It manages environment-specific configurations (dev, staging, prod) through a deployment.yaml file. Use when: - Modifying or creating deployment.yaml for deployment settings. - Resolving environment-specific variables (e.g., Project IDs, Regions) for deployment. - Provisioning supported infrastructure like BigQuery datasets/tables, Dataform resources, or DTS resources via deployment.yaml. Do not use when: - Resources already exist. - Managing resources not supported by `gcloud beta orchestration-pipelines resource-types list`. - Managing general cloud infrastructure (VMs, networks, Kubernetes, IAM policies), which are better suited for Terraform. - Infrastructure spans multiple cloud providers (AWS, Azure, etc.). - Already uses Terraform for the target resources.
- License 许可
- Apache-2.0
- 最近更新
- 2026-08-23
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- gcp-pipeline-resource-provisioning
- license
- Apache-2.0
- metadata
- { "version": "v1", "publisher": "google" }
- description
- Automates declarative resource creation and provisioning for data pipelines, supporting BigQuery, Dataform, Dataproc, BigQuery Data Transfer Service (DTS), and other resources. It manages environment-specific configurations (dev, staging, prod) through a deployment.yaml file. Use when: - Modifying or creating deployment.yaml for deployment settings. - Resolving environment-specific variables (e.g., Project IDs, Regions) for deployment. - Provisioning supported infrastructure like BigQuery datasets/tables, Dataform resources, or DTS resources via deployment.yaml. Do not use when: - Resources already exist. - Managing resources not supported by `gcloud beta orchestration-pipelines resource-types list`. - Managing general cloud infrastructure (VMs, networks, Kubernetes, IAM policies), which are better suited for Terraform. - Infrastructure spans multiple cloud providers (AWS, Azure, etc.). - Already uses Terraform for the target resources.
02 资源文件 1
03 SKILL.md 正文
How to use this skill
Create or update existing deployment.yaml file and deploy resources. All
configuration files MUST be maintained together in the repository root.
Mandatory labels
[!IMPORTANT]
Whenever you generate resource definitions in
deployment.yaml, you MUST directly populate thedatacloudlabel underdefinition.labelsfor every resource to track the source of creation. Determine the value based on your current IDE environment:
- For Antigravity, set
datacloud: "antigravity"- For VS Code, set
datacloud: "vscode"- For any other environment, set
datacloud: "other"Do not use a variable substitution for this label; hardcode the appropriate string value directly into each resource definition (e.g., replacing
__REQUIRED_LABEL__placeholders).Special rule for BigQuery DTS Ingestion: Whenever you generate a
bigquerydatatransfer.transferConfigindeployment.yaml, you MUST also explicitly define its target destinationbigquery.datasetin the same file and apply thedatacloudlabel to it. You must do this even if the dataset already exists, to ensure the destination dataset's labels are patched and updated.
Step 1: Supported Resource Types
The framework supports deploying various GCP resources. To see the comprehensive list of supported resource types, run the following command:
gcloud beta orchestration-pipelines resource-types list
Refer to: references/gcp-pipeline-resource-provisioning_spec.md to understand
the template for deployment.yaml.
Step 2: Discover Environment Parameters
Before generating configurations, discover the actual values for the target project, region, environment, and commit SHA.
[!TIP]
If
deployment.yamlalready exists in the repository root, prioritize extractingprojectandregionfrom the target environment configuration (e.g.,dev).
-
Project ID:
gcloud config get project -
Project Number:
gcloud projects describe $(gcloud config get project) --format="value(projectNumber)" -
Region:
gcloud config get-value compute/region -
Commit SHA:
git rev-parse HEAD -
Environment Name: If initialization is needed, you MUST ask the user for the environment name. If the user does not provide it, use dev as the default.
[!TIP]
Use these commands to replace placeholders like
YOUR_PROJECT_IDwith actual values. Always remove associated comments that start with TODO once replaced.
Step 3: Generate or update deployment.yaml
Create or update deployment.yaml in the repository root. This file maps
supported environments (dev, stage, prod) to their specific
configurations and resources.
[!TIP]
Use the Reference Spec: The agent can use the
references/gcp_pipeline_resource_provisioning_spec.mdfile as a template. It includes sample definitions for select supported resource types. Copy and adapt the required resource blocks into thedeployment.yaml. Usegcloud beta orchestration-pipelines resource-types listwhen needed.
[!IMPORTANT]
Handling Secrets & Privacy (CRITICAL): NEVER hardcode plain-text secrets in
deployment.yaml.
- Sensitive Data (Secrets): Sensitive information such as passwords, API keys, and other sensitive information MUST be stored in Secret Manager and declared in the
secrets:block ofdeployment.yaml.- Non-Sensitive Data (Variables): General configuration (e.g., dataset names, table IDs, regions) could be declared in the
variables:block.- Substitution via
{{ VAR }}: Bothvariables:andsecrets:MUST be used as{{ VARIABLE_NAME }}substitutions in resource definitions.- No Creation: The agent MUST NOT use the framework to create new secrets. If
gcloudindicates the secret does not exist, the agent MUST ask the user to create it manually and then re-verify.- Reference Only Policy: The agent's role is strictly limited to referencing existing secrets. The agent MUST NEVER read, print, or inspect the values of secrets.
- Safe Deployment: The actual value injection happens during deployment execution. The agent only provides the reference.
- Manual Secret Management: Advise the user to manage secret payloads and versions manually.
Step 4: Validation
The agent MUST validate the deployment.yaml before generating the deployment
script. This ensures the configuration is syntactically correct and all
variables are resolvable.
gcloud beta orchestration-pipelines validate --environment=<ENV_NAME>
Step 5: Deployment
Run the following command to deploy the resources to the target environment.
gcloud beta orchestration-pipelines deploy --environment=<ENV_NAME> --local
[!NOTE]
If a new transfer is being created, make sure to NOT remove the DTS transfer resource from
deployment.yamlafter it completes the run.
Definition of Done
deployment.yamlexists in the repository root with actual discovered values (no placeholders) and correct resource definitions.- The agent runs the deployment command to perform the deployment, and it executes successfully (exit code 0).
04 同仓库更多 Skills
skill-repair
Use this to fix and re-install agent skills that have failed installation. This skill provides the necessary context and permissions to surgically update the `manifest.json` after a fix has been applied.
notebook-guidance
This skill guides the use of Jupyter notebooks for data analysis, exploration, and visualization, particularly with BigQuery. It outlines best practices for notebook execution and validation (supporting both cell-by-cell execution and full notebook generation depending on tool availability), library installation, and structuring notebooks for clarity. It also covers specific rules for data cleaning, plotting, and integrating with BigQuery SQL and machine learning workflows. Relevant when any of the following conditions are true: 1. The user request involves a data analysis, data exploration, data visualization, or data insights task that requires multiple steps, queries, or visualizations to answer. 2. The user explicitly requests a notebook (.ipynb). 3. You are creating, editing, or executing cells in a Jupyter notebook. 4. You need to query BigQuery from within a notebook. DO NOT use the Python BigQuery client library; instead, you MUST use the `%%bqsql` magics explained in this skill.
ml-best-practices
CRITICAL RULE: You MUST use this skill whenever the task involves any machine learning tasks or data analysis. Use this skill if the user's prompt or requirements mention any of the following: * Clustering * Classification * Regression * Time series forecasting * Statistical testing * Model comparison * ML * Data analysis SQL/BigQuery ML HANDOFF: If the user requires a SQL solution, use this skill to dictate the ANALYSIS STEPS (e.g., markdown analysis cells, visualization logic), but defer to `bigquery` for all SQL syntax.
managing-python-dependencies
Ensures proper Python dependency management, avoiding global `pip install` and adhering to project-specific tooling. Use this skill if any of the following are true: 1. Attempting to run `pip install {package_name}`. 2. Python packages or dependencies need to be added or modified. 3. Initiating a new Python project. 4. Creating a new notebook, even if just using BigQuery cells. 5. Generating Python code that includes `import` statements for third-party libraries. 6. Before executing Python scripts via the terminal to ensure the correct virtual environment is active.
google-cloud-storage-basics
Stores, retrieves, and manages data as objects in Cloud Storage (Google Cloud Storage, or GCS) buckets. Use when you need to interact with Cloud Storage — create or configure buckets, upload, download, stream, or transfer data, organize objects with folders, generate signed URLs, control access (IAM, ACLs, public access prevention), set storage classes and tiering (Standard, Nearline, Coldline, Archive), manage cost and lifecycle, protect data (versioning, encryption/CMEK, retention and Bucket Lock, object holds, soft delete), host static websites, trigger Pub/Sub notifications on object changes, mount buckets as a file system (gcsfuse), or optimize storage performance at any scale. Covers the gcloud storage / gsutil CLI, JSON and XML APIs, client libraries, Terraform, and Cloud Storage MCP servers. Don't use for block storage (Persistent Disk), data warehousing/analytics (BigQuery), or databases (Cloud SQL, Spanner, Bigtable, Firestore).
gcs-security-assessment
Assesses security posture, evaluates risks, and checks SAIF compliance for Google Cloud Storage buckets or projects. Use when the user requests security scans, vulnerability checks, or SAIF assessments. Don't use when: The user is asking about non-GCS resources (Compute Engine, GKE, etc.), investigating a live production outage, or asking general security questions not tied to a specific project or bucket.