On September 15, 2026, all Cloud Composer 1 versions and versions 2.0.x of Cloud Composer 2 will reach their planned end of life. You will not be able to use environments with these versions. We recommend planning migration to Cloud Composer 3. Cloud Composer 2 versions 2.1.x and later are still supported and are not impacted by this change.
You can manage and access Cloud Composer environments
with gcloud composer commands provided by
Google Cloud CLI.
To start with the gcloud tool, review
the Google Cloud CLI documentation.
You can get help for the tool, resources, and commands by using the --help
flag:
gcloudcomposerenvironments--help
The help displayed with the --help flag is also available in the
Google Cloud CLI reference for gcloud composer.
Setting the default project and location in your local client
Most gcloud composer commands require a location. You can specify the
location by using the --location flag or by setting the default location.
To set the default project and location for Cloud Composer:
Set the default project by running the following command:
gcloudconfigsetprojectPROJECT_ID
Replace the following:
PROJECT_ID: the Project ID of the
project where your Cloud Composer environment is located.
Configure the Cloud Composer location by running the following
command:
gcloudconfigsetcomposer/locationLOCATION
Replace the following:
LOCATION: the region where the environment is located, such as
us-central1 or europe-west1.
(Optional) To list the configuration for Google Cloud CLI, you can run the
following command:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis page explains how to use the Google Cloud CLI tool to interact with Cloud Composer environments.\u003c/p\u003e\n"],["\u003cp\u003eBefore using the \u003ccode\u003egcloud composer\u003c/code\u003e commands, the Cloud Composer API must be enabled, and Google Cloud CLI needs to be installed on your local client.\u003c/p\u003e\n"],["\u003cp\u003eYou can set a default project and location for Cloud Composer using the \u003ccode\u003egcloud config set\u003c/code\u003e command, eliminating the need to repeatedly specify them with each command.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--help\u003c/code\u003e flag can be used with \u003ccode\u003egcloud composer\u003c/code\u003e commands to display help information, which is also available in the Google Cloud CLI reference documentation.\u003c/p\u003e\n"]]],[],null,["# Using Google Cloud CLI with Cloud Composer\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nThis page describes how to get started using Google Cloud CLI with\nCloud Composer environments.\n\nBefore you begin\n----------------\n\n- Google Cloud CLI uses Cloud Composer API to run `gcloud composer` commands, so you must [enable the API](/composer/docs/latest/enable-composer-service).\n- Install [Google Cloud CLI](/sdk/docs/install) on your local client.\n\nGetting started with the gcloud command-line tool\n-------------------------------------------------\n\nYou can manage and access Cloud Composer environments\nwith `gcloud composer` commands provided by\n[Google Cloud CLI](/sdk/docs).\n\nTo start with the `gcloud` tool, review\nthe [Google Cloud CLI documentation](/sdk/docs).\nYou can get help for the tool, resources, and commands by using the `--help`\nflag: \n\n gcloud composer environments --help\n\nThe help displayed with the `--help` flag is also available in the\n[Google Cloud CLI reference](/sdk/gcloud/reference/composer) for `gcloud composer`.\n\nSetting the default project and location in your local client\n-------------------------------------------------------------\n\nMost `gcloud composer` commands require a location. You can specify the\nlocation by using the `--location` flag or by setting the default location.\n\nTo set the default project and location for Cloud Composer:\n\n1. Set the default project by running the following command:\n\n gcloud config set project \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n\n Replace the following:\n - `PROJECT_ID`: the [Project ID](/resource-manager/docs/creating-managing-projects) of the project where your Cloud Composer environment is located.\n2. Configure the Cloud Composer location by running the following\n command:\n\n gcloud config set composer/location \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e\n\n Replace the following:\n - `LOCATION`: the region where the environment is located, such as `us-central1` or `europe-west1`.\n3. (Optional) To list the configuration for Google Cloud CLI, you can run the\n following command:\n\n gcloud config list\n\nWhat's next\n-----------\n\n- [Add and update Airflow DAGs](/composer/docs/latest/manage-dags)\n- [`gcloud composer` reference](/sdk/gcloud/reference/composer)\n- [`gcloud beta composer` reference](/sdk/gcloud/reference/beta/composer)"]]