Deleting a Variable

This page explains how to delete variables. To learn more about variables and the Runtime Configurator service, Runtime Configurator Fundamentals.

To learn how to create a variable, see Setting and Getting Data.

Before you begin

Deleting a variable

You can delete a single variable or recursively delete all variables under a specific path.

Deployment Manager

Delete a variable that is part of a deployment using one of the following methods:


To delete a variable with the gcloud command-line tool, use the runtime-config configs variables delete command:

gcloud beta runtime-config configs variables unset [VARIABLE_KEY] --config-name [CONFIG_NAME]

where [VARIABLE_KEY] is the key of the variable and [CONFIG_NAME] is the name of the config this variable belongs to.

If you want to recursively delete all variables under a certain path, provide the --recursive flag.

The gcloud tool returns a response like:

Deleted [[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_KEY].


In the REST API, make a DELETE request to the following URI to delete a new variable:[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_KEY]


  • [PROJECT_ID] is the project ID for this request.
  • [CONFIG_NAME] is the name for this configuration.
  • [VARIABLE_KEY] is the variable to delete.

If you want to recursively delete all variables under a specific pass, provide a payload with your request that has the recursive property set to true:

   "recursive": true

If successful, the API returns an empty response.

To learn more about the method, read the variables().delete documentation.

What's next?

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Deployment Manager Documentation