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 perbedaan antara jenis jaringan lingkungan IP Pribadi dan IP Publik di Cloud Composer 3 serta memberikan petunjuk untuk mengganti jenis jaringan lingkungan Anda.
Cloud Composer 3 menggunakan dua jenis jaringan lingkungan:
Jaringan IP publik:
Komponen Airflow di lingkungan dapat mengakses internet. Ini adalah jenis jaringan default.
Komponen Airflow di lingkungan IP Publik membuat koneksi keluar dari alamat IP dan port publik yang dialokasikan secara otomatis.
Jika ingin lingkungan IP Publik Anda menggunakan alamat IP dan port yang telah ditentukan, Anda dapat melakukannya dengan menghubungkan jaringan VPC ke lingkungan Anda dan mengalihkannya ke IP Pribadi.
Dalam hal ini, Cloud Composer merutekan semua traffic kecuali traffic ke layanan Google melalui jaringan ini.
Jaringan IP pribadi:
Komponen Airflow lingkungan tidak memiliki akses ke internet.
Lingkungan IP pribadi mengonfigurasi Akses Google Pribadi melalui rentang private.googleapis.com, yang memungkinkan akses ke Google API, layanan, dan domain yang didukung oleh rentang ini.
Untuk mengetahui informasi selengkapnya dan daftar layanan serta domain yang tersedia melalui private.googleapis.com, lihat Konfigurasi jaringan dalam dokumentasi Virtual Private Cloud.
Lingkungan IP pribadi dengan Kontrol Layanan VPC mengonfigurasi
Akses Google Pribadi melalui rentang restricted.googleapis.com, yang memungkinkan akses ke Google API, layanan, dan domain yang didukung oleh rentang ini.
Untuk mengetahui informasi selengkapnya dan daftar layanan serta domain yang tersedia melalui restricted.googleapis.com, lihat Konfigurasi jaringan dalam dokumentasi Virtual Private Cloud.
Selain dua jenis jaringan, Anda dapat mengaktifkan atau menonaktifkan akses ke jaringan VPC kustom untuk jenis lingkungan apa pun. Bergantung pada cara Anda mengonfigurasi jaringan VPC, lingkungan IP Pribadi dapat memperoleh akses ke internet melalui jaringan VPC Anda.
Jaringan Cloud Composer 2 dibandingkan dengan Cloud Composer 3
Di Cloud Composer 3, lingkungan IP Pribadi tidak memerlukan konfigurasi.
Fitur jaringan Cloud Composer 2 berikut tidak lagi relevan di
Cloud Composer 3:
Mengonfigurasi jaringan IP Pribadi. Anda tidak
perlu menentukan rentang IP, jaringan, atau mengonfigurasi konektivitas dan aturan
firewall.
Anda dapat menetapkan variabel lingkunganhttp_proxy dan https_proxy
di lingkungan Anda. Variabel Linux standar ini digunakan oleh klien web yang berjalan di container cluster lingkungan Anda untuk merutekan traffic melalui proxy yang ditentukan.
Variabel NO_PROXY secara default disetel ke daftar domain Google dan localhost sehingga domain tersebut dikecualikan dari proxy:
.google.com,.googleapis.com,metadata.google.internal,localhost. Konfigurasi ini memungkinkan pembuatan lingkungan dengan variabel lingkungan http_proxy dan https_proxy yang ditetapkan jika proxy tidak dikonfigurasi untuk menangani traffic ke layanan Google.
[[["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-26 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)"]]