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.
This page explains the difference between Private IP and Public IP environment
networking types in Cloud Composer 3 and provides instructions for switching
the networking type of your environment.
Cloud Composer 3 uses two environment networking types:
Public IP networking:
Airflow components of the environment can access the
internet. This is the default networking type.
Airflow components in Public IP environments establish outbound
connections from automatically allocated public IP addresses and ports.
If you want your Public IP environments to use predetermined IP
addresses and ports, you can do so through
connecting a VPC network to your environment
and switching it to Private IP.
In this case, Cloud Composer routes all traffic except
traffic to Google services through this network.
Private IP networking:
Airflow components of the environment don't have access to
the internet.
Private IP environments configure Private Google Access through the
private.googleapis.com range, which enables access to
Google APIs, services, and domains supported by this range.
For more information and the list of services and domains available
through private.googleapis.com, see
Network configuration
in the Virtual Private Cloud documentation.
Private IP environments with VPC Service Controls configure
Private Google Access through the restricted.googleapis.com
range, which enables access to Google APIs, services, and domains supported by this range.
For more information and the list of services and domains available
through restricted.googleapis.com, see
Network configuration
in the Virtual Private Cloud documentation.
In addition to two networking types, you can
enable or disable access to a custom VPC network for
any type of environment. Depending on how you configure your VPC network, a
Private IP environment can gain access the internet through you VPC network.
Cloud Composer 2 networking compared to Cloud Composer 3
In Cloud Composer 3, Private IP environments require no configuration.
The following Cloud Composer 2 networking features are no longer relevant in
Cloud Composer 3:
You can set http_proxy and https_proxyenvironment variables
in your environment. These standard Linux variables are used by web clients
that run in containers of your environment's cluster to route traffic through
the specified proxies.
The NO_PROXY variable by default is set to a list of Google domains and
localhost so that they are excluded from proxying:
.google.com,.googleapis.com,metadata.google.internal,localhost. This
configuration makes it possible to create an environment with set http_proxy
and https_proxy environment variables in cases when the proxy isn't
configured to handle traffic to Google services.
[[["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-08-25 UTC."],[[["\u003cp\u003eCloud Composer 3 offers two networking types: Public IP, which allows internet access, and Private IP, which restricts internet access but enables connections to Google services through specific ranges.\u003c/p\u003e\n"],["\u003cp\u003ePublic IP environments have default outbound internet access, while Private IP environments access Google services through \u003ccode\u003eprivate.googleapis.com\u003c/code\u003e or \u003ccode\u003erestricted.googleapis.com\u003c/code\u003e ranges and can gain internet access if configured with a VPC network.\u003c/p\u003e\n"],["\u003cp\u003eCloud Composer 3 simplifies Private IP configurations compared to Cloud Composer 2, eliminating the need for manual settings of IP ranges, networks, or Private Service Connect.\u003c/p\u003e\n"],["\u003cp\u003eThe networking type of a Cloud Composer 3 environment can be switched between Public IP and Private IP using the Google Cloud console, \u003ccode\u003egcloud\u003c/code\u003e command-line tool, API requests, or Terraform configurations.\u003c/p\u003e\n"]]],[],null,["# Change environment networking type (Private or Public IP)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\n**Cloud Composer 3** \\| [Cloud Composer 2](/composer/docs/composer-2/configure-private-ip \"View this page for Cloud Composer 2\") \\| [Cloud Composer 1](/composer/docs/composer-1/configure-private-ip \"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 explains the difference between Private IP and Public IP environment\nnetworking types in Cloud Composer 3 and provides instructions for switching\nthe networking type of your environment.\n\nIf you want to disable or enable internet access only when installing PyPI packages, see\n[Configure internet access when installing PyPI packages](/composer/docs/composer-3/packages-internet-access).\n\nIf you want to enable access to your VPC network from your environment,\nsee [Connect an environment to a VPC network](/composer/docs/composer-3/connect-vpc-network).\n\nAbout environment networking types\n----------------------------------\n\nCloud Composer 3 uses two environment networking types:\n\n- *Public IP networking*:\n\n - Airflow components of the environment can access the\n internet. This is the default networking type.\n\n - Airflow components in Public IP environments establish outbound\n connections from automatically allocated public IP addresses and ports.\n If you want your Public IP environments to use predetermined IP\n addresses and ports, you can do so through\n [connecting a VPC network](/composer/docs/composer-3/connect-vpc-network) to your environment\n and [switching it to Private IP](#change-networking-type).\n In this case, Cloud Composer routes all traffic except\n traffic to Google services through this network.\n\n- *Private IP networking*:\n\n - Airflow components of the environment don't have access to\n the internet.\n\n - Private IP environments configure Private Google Access through the\n `private.googleapis.com` range, which enables access to\n Google APIs, services, and domains supported by this range.\n\n For more information and the list of services and domains available\n through `private.googleapis.com`, see\n [Network configuration](/vpc/docs/configure-private-google-access-hybrid#config-choose-domain)\n in the Virtual Private Cloud documentation.\n - [Private IP environments with VPC Service Controls](/composer/docs/composer-3/configure-vpc-sc) configure\n Private Google Access through the `restricted.googleapis.com`\n range, which enables access to Google APIs, services, and domains supported by this range.\n\n For more information and the list of services and domains available\n through `restricted.googleapis.com`, see\n [Network configuration](/vpc/docs/configure-private-google-access-hybrid#config-choose-domain)\n in the Virtual Private Cloud documentation.\n\nIn addition to two networking types, you can\n[enable or disable access to a custom VPC network](/composer/docs/composer-3/connect-vpc-network) for\nany type of environment. Depending on how you configure your VPC network, a\nPrivate IP environment can gain access the internet through you VPC network.\n\n### Cloud Composer 2 networking compared to Cloud Composer 3\n\nIn Cloud Composer 3, Private IP environments require no configuration.\n\nThe following Cloud Composer 2 networking features are no longer relevant in\nCloud Composer 3:\n\n- [Configuring Private IP networking](/composer/docs/composer-2/configure-private-ip). You don't\n need to specify IP ranges, networks, or configure connectivity and firewall\n rules.\n\n- [Configuring Private Service Connect](/composer/docs/composer-2/configure-private-service-connect).\n You don't need to set ranges for Private Service Connect\n in Cloud Composer 3.\n\n | **Note:** [Custom VPC network attachments](/composer/docs/composer-3/connect-vpc-network) in Cloud Composer 3 are based on Private Service Connect. This implementation is **not related** to how Private Service Connect is used in Cloud Composer 2 (for connectivity between the environment's cluster and the resources located in the tenant project). In Cloud Composer 3, network attachments are used differently, you don't need to reflect your Cloud Composer 2 networking setup in them.\n- [Using privately used public IP ranges](/composer/docs/composer-2/configure-privately-used-public-ip). This feature provided an\n option to extend the available IP ranges, which are not required in\n Cloud Composer 3.\n\n- [Using the IP Masquerade agent](/composer/docs/composer-2/enable-ip-masquerade-agent). You don't need to configure\n cluster connectivity in Cloud Composer 3.\n\n- [Configuring authorized networks](/composer/docs/composer-2/configure-authorized-networks). It is not\n possible to access the environment's cluster in Cloud Composer 3.\n\nChange environment networking type\n----------------------------------\n\n### Console\n\n1. In the 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 **Environment configuration** tab.\n\n4. In the **Networking configuration** section, find the\n **Networking type** item and click **Edit**.\n\n5. In the **Networking type** dialog, select:\n\n - **Public IP environment (default)** for Public IP networking.\n - **Private IP environment** for Private IP networking.\n6. Click **Save**.\n\n### gcloud\n\nThe Following Google Cloud CLI arguments change the environment's\nnetworking type:\n\n- `--enable-private-environment`: changes to Private IP networking.\n- `--disable-private-environment`: changes to Public IP networking (default).\n\nChange to Private IP networking: \n\n gcloud beta composer environments update \u003cvar translate=\"no\"\u003eENVIRONMENT_NAME\u003c/var\u003e \\\n --location \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e \\\n --enable-private-environment\n\nChange to Public IP networking: \n\n gcloud beta composer environments update \u003cvar translate=\"no\"\u003eENVIRONMENT_NAME\u003c/var\u003e \\\n --location \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e \\\n --disable-private-environment\n\nReplace the following:\n\n- `ENVIRONMENT_NAME`: the name of the environment.\n- `LOCATION`: the region where the environment is located.\n\nExample (Private IP): \n\n gcloud beta composer environments update example-environment \\\n --location us-central1 \\\n --enable-private-environment\n\nExample (Public IP): \n\n gcloud beta composer environments update example-environment \\\n --location us-central1 \\\n --disable-private-environment\n\n### API\n\n1. Create an [`environments.patch`](/composer/docs/reference/rest/v1beta1/projects.locations.environments/patch) API request.\n\n2. In this request:\n\n 1. In the `updateMask` parameter, specify\n the `config.private_environment_config.enable_private_environment`\n mask.\n\n 2. In the request body, in the `enablePrivateEnvironment` field:\n\n - Specify `true` to change to Private IP networking.\n - Specify `false` to change to Public IP networking (default).\n\nExample (Private IP): \n\n // PATCH https://composer.googleapis.com/v1beta1/projects/example-project/\n // locations/us-central1/environments/example-environment?updateMask=\n // config.private_environment_config.enable_private_environment\n\n \"config\": {\n \"privateEnvironmentConfig\": {\n \"enablePrivateEnvironment\": true\n }\n }\n\n### Terraform\n\nThe `enable_private_environment` field in the `config` block specifies the\nenvironment's networking type:\n\n- `true`: Private IP networking.\n- `false` or omitted: Public IP networking (default).\n\n resource \"google_composer_environment\" \"example\" {\n provider = google-beta\n name = \"\u003cvar translate=\"no\"\u003eENVIRONMENT_NAME\u003c/var\u003e\"\n region = \"\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e\"\n\n config {\n\n enable_private_environment = \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-err\"\u003ePRIVATE_IP_STATUS\u003c/span\u003e\u003c/var\u003e\n\n }\n }\n\nReplace the following:\n\n- `ENVIRONMENT_NAME`: the name of your environment.\n- `LOCATION`: the region where the environment is located.\n- `PRIVATE_IP_STATUS`: `true` for Private IP, `false` for Public IP\n\nExample (Private IP): \n\n resource \"google_composer_environment\" \"example\" {\n provider = google-beta\n name = \"example-environment\"\n region = \"us-central1\"\n\n config {\n\n enable_private_environment = true\n\n ... other configuration parameters\n }\n }\n\nConfigure proxy server variables\n--------------------------------\n\n| **Important:** Routing with proxy variables is done on a best-effort basis. **There's no guarantee that every request goes through the proxy** . Instead, we recommend to route traffic by [attaching a VPC network](/composer/docs/composer-3/connect-vpc-network) to your environment and configuring traffic routing rules in this network.\n\nYou can set `http_proxy` and `https_proxy` [environment variables](/composer/docs/composer-3/set-environment-variables)\nin your environment. These standard Linux variables are used by web clients\nthat run in containers of your environment's cluster to route traffic through\nthe specified proxies.\n\nThe `NO_PROXY` variable by default is set to a list of Google domains and\n`localhost` so that they are excluded from proxying:\n`.google.com,.googleapis.com,metadata.google.internal,localhost`. This\nconfiguration makes it possible to create an environment with set `http_proxy`\nand `https_proxy` environment variables in cases when the proxy isn't\nconfigured to handle traffic to Google services.\n\nWhat's next\n-----------\n\n- [Configure VPC Service Controls](/composer/docs/composer-3/configure-vpc-sc)"]]