Pada 15 September 2026, semua lingkungan Cloud Composer 1 dan Cloud Composer 2 versi 2.0.x akan mencapai akhir masa pakainya yang direncanakan, dan Anda tidak akan dapat menggunakannya. Sebaiknya rencanakan migrasi ke Cloud Composer 3.
Halaman ini menjelaskan cara mengganti opsi konfigurasi Airflow untuk lingkungan Cloud Composer baru dan yang sudah ada.
Saat membuat atau memperbarui lingkungan, Anda dapat
mengganti opsi konfigurasi Apache Airflow dengan
nilai yang berbeda. Dengan demikian, Anda dapat menyesuaikan instance Airflow sesuai dengan kebutuhan dan persyaratan Anda.
Mengganti opsi konfigurasi Airflow untuk lingkungan baru
Anda dapat mengganti opsi konfigurasi Airflow saat membuat
lingkungan. Untuk mengetahui informasi selengkapnya, lihat
Membuat lingkungan.
Mengganti opsi konfigurasi Airflow untuk lingkungan yang ada
Untuk mengganti semua penggantian konfigurasi Airflow yang ada dengan
opsi yang ditentukan, di parameter updateMask, tentukan
mask config.softwareConfig.airflowConfigOverrides.
Untuk mengganti opsi konfigurasi Airflow tertentu, di
parameter updateMask, tentukan
mask
config.softwareConfig.airflowConfigOverrides.KEY. Ganti KEY dengan bagian konfigurasi dan nama
opsi yang dipisahkan oleh tanda hubung, misalnya, webserver-dag_orientation.
Jika Anda ingin mengganti beberapa opsi konfigurasi Airflow, dalam
parameter updateMask, tentukan beberapa mask yang dipisahkan dengan koma.
Isi permintaan harus berisi daftar opsi konfigurasi Airflow.
Jika Anda mengganti semua penggantian yang ada, pastikan untuk menyertakan semua penggantian yang ingin Anda pertahankan.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-29 UTC."],[[["\u003cp\u003eThis document details how to customize Apache Airflow settings within Cloud Composer 3 environments, allowing users to tailor their Airflow instances to specific requirements.\u003c/p\u003e\n"],["\u003cp\u003eAirflow configuration options can be overridden when creating a new environment or by modifying an existing one through the Google Cloud console, gcloud command-line tool, API requests, or Terraform.\u003c/p\u003e\n"],["\u003cp\u003eWhen updating existing environments using gcloud, users can add, change, or remove specific Airflow configuration overrides individually or all together.\u003c/p\u003e\n"],["\u003cp\u003eThe API method supports replacing all existing Airflow configurations or updating specific settings, requiring users to specify the relevant \u003ccode\u003eupdateMask\u003c/code\u003e parameter.\u003c/p\u003e\n"],["\u003cp\u003eTerraform allows for setting Airflow configuration overrides within the \u003ccode\u003esoftware_config\u003c/code\u003e block when creating or managing a Cloud Composer environment.\u003c/p\u003e\n"]]],[],null,["# Override Airflow configuration options\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\n**Cloud Composer 3** \\| [Cloud Composer 2](/composer/docs/composer-2/override-airflow-configurations \"View this page for Cloud Composer 2\") \\| [Cloud Composer 1](/composer/docs/composer-1/override-airflow-configurations \"View this page for Cloud Composer 1\")\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nThis page describes how to override Airflow configuration options for new and\nexisting Cloud Composer environments.\n\nWhen you [create](/composer/docs/composer-3/create-environments) or [update](/composer/docs/composer-3/update-environments) an environment, you can\noverride [Apache Airflow configuration options](https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html) with\ndifferent values. By doing so you can adjust the Airflow instance to your\nneeds and requirements.\n| **Note:** some Airflow configuration options are [blocked](/composer/docs/airflow-configurations) and you cannot override them.\n\nOverride Airflow configuration options for new environments\n-----------------------------------------------------------\n\nYou can override Airflow configuration options when you create your\nenvironment. For more information, see\n[Create environments](/composer/docs/composer-3/create-environments#overrides-env-vars).\n\nOverride Airflow configuration options for existing environments\n----------------------------------------------------------------\n\n### Console\n\nTo override [Airflow configuration options](https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html) for an\nexisting environment:\n\n1. In Google Cloud console, go to the **Environments** page.\n\n [Go to Environments](https://console.cloud.google.com/composer/environments)\n2. In the list of environments, click the name of your environment.\n The **Environment details page opens**.\n\n3. Go to the **Airflow configuration overrides** tab.\n\n4. Click **Edit**.\n\n5. Enter the **Section** , **Key** , and **Value** for the Airflow\n configuration option that you want to change.\n\nFor example:\n\n### gcloud\n\nFollowing arguments override\n[Airflow configuration options](https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html) for an existing\nenvironment:\n\n- `--update-airflow-configs` adds or changes specified Airflow configuration overrides.\n- `--remove-airflow-configs` removes specified Airflow configuration overrides.\n- `--clear-airflow-configs` removes all Airflow configuration overrides.\n\n gcloud composer environments update \u003cvar translate=\"no\"\u003eENVIRONMENT_NAME\u003c/var\u003e \\\n --location \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e \\\n --update-airflow-configs=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-nv\"\u003eKEY\u003c/span\u003e\u003cspan class=\"devsite-syntax-o\"\u003e=\u003c/span\u003eVALUE,KEY\u003cspan class=\"devsite-syntax-o\"\u003e=\u003c/span\u003eVALUE,...\u003c/var\u003e\n\nReplace:\n\n- `ENVIRONMENT_NAME` with the name of the environment.\n- `LOCATION` with the region where the environment is located.\n- `KEY` with the configuration section and the option name separated by a hyphen, for example, `webserver-dag_orientation`.\n- `VALUE` with the corresponding value for an option.\n\nFor example: \n\n gcloud composer environments update example-environment \\\n --location us-central1 \\\n --update-airflow-configs=webserver-dag_default_view=graph,webserver-dag_orientation=RL\n\n### API\n\nTo override [Airflow configuration options](https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html) for an\nexisting environment:\n\n1. Construct an [`environments.patch`](/composer/docs/reference/rest/v1/projects.locations.environments/patch) API request.\n\n2. In this request:\n\n - To replace all existing Airflow configuration overrides with\n the specified options, in the `updateMask` parameter, specify\n the `config.softwareConfig.airflowConfigOverrides` mask.\n\n - To override a specific Airflow configuration option, in\n the `updateMask` parameter, specify\n the `config.softwareConfig.airflowConfigOverrides.`\u003cvar translate=\"no\"\u003eKEY\u003c/var\u003e\n mask. Replace `KEY` with the configuration section and the option\n name separated by a hyphen, for example, `webserver-dag_orientation`.\n\n If you want to override several Airflow configuration options, in\n the `updateMask` parameter, specify several masks separated by commas.\n3. The request body must contain the list of Airflow configuration options.\n If you are replacing all existing overrides, make sure to include all\n overrides that you want to keep.\n\n {\n \"config\": {\n \"softwareConfig\": {\n \"airflowConfigOverrides\": {\n \"\u003cvar translate=\"no\"\u003eKEY\u003c/var\u003e\": \"\u003cvar translate=\"no\"\u003eVALUE\u003c/var\u003e\"\n }\n }\n }\n }\n\nReplace:\n\n- `KEY` with the configuration section and the option name separated by a hyphen, for example, `webserver-dag_orientation`.\n- `VALUE` with the corresponding value for an option.\n\nThe following example overrides two specific Airflow configuration options: \n\n // PATCH https://composer.googleapis.com/v1/projects/example-project/\n // locations/us-central1/environments/example-environment?updateMask=\n // config.softwareConfig.airflowConfigOverrides.webserver-dag_default_view,\n // config.softwareConfig.airflowConfigOverrides.webserver-dag_orientation\n\n {\n \"config\": {\n \"softwareConfig\": {\n \"airflowConfigOverrides\": {\n \"webserver-dag_default_view\": \"graph\",\n \"webserver-dag_orientation\": \"RL\"\n }\n }\n }\n }\n\n### Terraform\n\nThe `airflow_config_overrides` block in the `software_config` block\ncontrols overrides of [Airflow configuration options](https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html)\nfor your environment: \n\n resource \"google_composer_environment\" \"example\" {\n\n config {\n\n # ... Other environment configuration parameters\n\n software_config {\n airflow_config_overrides = {\n \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-na\"\u003eKEY\u003c/span\u003e\u003c/var\u003e = \"\u003cvar translate=\"no\"\u003eVALUE\u003c/var\u003e\"\n }\n }\n }\n }\n\nReplace:\n\n- `KEY` with the configuration section and the option name separated by a hyphen, for example, `webserver-dag_orientation`.\n- `VALUE` with the corresponding value for an option.\n\nExample: \n\n resource \"google_composer_environment\" \"example\" {\n provider = google-beta\n name = \"example-environment\"\n region = \"us-central1\"\n\n # ... Other environment configuration parameters\n\n config {\n software_config {\n airflow_config_overrides = {\n webserver-dag_default_view = \"graph\"\n webserver-dag_orientation = \"RL\"\n }\n }\n }\n }\n\nWhat's next\n-----------\n\n- [Blocked Airflow configurations](/composer/docs/airflow-configurations)\n- [Update environments](/composer/docs/composer-3/update-environments)"]]