> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/continuous-delivery/3.0/use-deployments/google-cloud-functions/step-library.md).

# Step Library

Reference for individual Google Cloud Functions deployment steps available in Harness CD.

Each Google Cloud Functions step runs as a plugin that authenticates to Google Cloud using the infrastructure definition's connector, then calls the Google Cloud Functions and Cloud Run APIs to deploy, shift traffic, or roll back a function. Use these steps directly in a blank canvas stage, or let a managed strategy add and wire them automatically.

The following steps are available:

| Step                                                                                                                                                                                     | Template ID                           | Description                                                                                   |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | --------------------------------------------------------------------------------------------- |
| [Google Cloud Functions deploy](https://developer.harness.io/continuous-delivery/3.0/use-deployments/google-cloud-functions/step-library/google-cloud-functions-deploy.md)               | `googleCloudFunctionDeployStep`       | Creates or updates a Google Cloud Function (Gen 2) from a manifest and artifact source.       |
| [Google Cloud Functions traffic shift](https://developer.harness.io/continuous-delivery/3.0/use-deployments/google-cloud-functions/step-library/google-cloud-functions-traffic-shift.md) | `googleCloudFunctionTrafficShiftStep` | Shifts a percentage of traffic between revisions on the function's backing Cloud Run service. |
| [Google Cloud Functions rollback](https://developer.harness.io/continuous-delivery/3.0/use-deployments/google-cloud-functions/step-library/google-cloud-functions-rollback.md)           | `googleCloudFunctionRollbackStep`     | Restores the function's previous serving traffic split on rollback.                           |

***

### Common step fields <a href="#common-step-fields" id="common-step-fields"></a>

The following fields appear on every step:

| Field               | Description                                                |
| ------------------- | ---------------------------------------------------------- |
| **Command Timeout** | Maximum time the step is allowed to run. Default is `10m`. |
| **Log Level**       | Log verbosity. Default is `info`.                          |

***

### Step placement <a href="#step-placement" id="step-placement"></a>

The deploy and traffic shift steps belong in the stage's main **Execution** steps list, in the order the function should be deployed and traffic shifted. The rollback step belongs in the stage's **Rollback** steps list, typically inside a step group so it only runs when the stage fails.

In a managed strategy such as **Basic**, **Canary**, or **Blue-green**, Harness adds and wires these steps automatically, including the rollback step group and the expressions that pass data between steps. In a **Blank canvas** stage, no steps are added by default. Add the deploy, traffic shift, and rollback steps manually from this step library, and wire the expressions between them yourself.

***

### Plugin image reference <a href="#plugin-image-reference" id="plugin-image-reference"></a>

Each step runs a dedicated plugin image. The image is embedded in the step template and is not user-configurable.

| Step          | Plugin image                                           |
| ------------- | ------------------------------------------------------ |
| Deploy        | `harnessdev/google-cloud-function-deploy:0.0.2`        |
| Traffic shift | `harnessdev/google-cloud-function-traffic-shift:0.0.2` |
| Rollback      | `harnessdev/google-cloud-function-rollback:0.0.2`      |
