Em 15 de setembro de 2026, todos os ambientes do Cloud Composer 1 e da versão 2.0.x do Cloud Composer 2 vão atingir o fim da vida útil planejado e não poderão mais ser usados. Recomendamos planejar a migração para o Cloud Composer 3.
Esta página descreve como modificar as opções de configuração do Airflow para ambientes novos e
existentes do Cloud Composer.
Ao criar ou atualizar um ambiente, é possível
modificar as opções de configuração do Apache Airflow com
valores diferentes. Ao fazer isso, você ajusta a instância do Airflow de acordo com suas necessidades e requisitos.
Modificar as opções de configuração do Airflow para novos ambientes
É possível substituir as opções de configuração do Airflow ao criar seu
ambiente. Para mais informações, consulte
Criar ambientes.
Modificar as opções de configuração do Airflow para ambientes atuais
Para substituir todas as modificações de configuração atuais do Airflow pelas opções especificadas, especifique a máscara config.softwareConfig.airflowConfigOverrides no parâmetro updateMask.
Para substituir uma opção de configuração específica do Airflow, no
parâmetro updateMask, especifique
a máscara config.softwareConfig.airflowConfigOverrides.KEY. Substitua KEY pela seção de configuração e pelo nome da opção
separados por um hífen, por exemplo, webserver-dag_orientation.
Se você quiser substituir várias opções de configuração do Airflow, no parâmetro updateMask, especifique várias máscaras separadas por vírgulas.
O corpo da solicitação precisa conter a lista de opções de configuração do Airflow.
Se você estiver substituindo todas as substituições atuais, inclua todas
as substituições que você quer manter.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-26 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)"]]