Create Cloud Composer environments Stay organized with collections Save and categorize content based on your preferences.
Cloud Composer 3 | Cloud Composer 2 | Cloud Composer 1
This page explains how to create a Cloud Composer environment.
- For more information about environments, seeEnvironment architecture.
- For more information about creating an environment with Terraform, seeCreate environments (Terraform).
Before you begin
Caution: It'sno longer possible to create Cloud Composer 1 environments inGoogle Cloud console. You can still create Cloud Composer 1 environmentsthrough Google Cloud CLI, Terraform, and API if your project supportscreating new Cloud Composer 1 environments.Enable the Cloud Composer API. For the full listof services used by Cloud Composer, seeServices required by Cloud Composer.
The approximate time to create an environment is25 minutes.
If you create an environment with Terraform, the service account used byTerraform musthave a role withthe
composer.environments.createpermission enabled.For more information about the service account for Terraform, seeGoogle Provider Configuration Reference.
For more information about using Terraform to create aCloud Composer environment, seeTerraform documentation.
For more information about additional parameters, seeTerraform Argument Reference.
Private IP: There are specific network and peering requirements tocreate a Private IP environment. For more information, seeConfiguring private IP.
Shared VPC: There are specific network requirements to use Shared VPCwith Cloud Composer. For information, seeConfiguring shared VPC.
VPC SC: To deploy Cloud Composer environments inside a securityperimeter, seeConfiguring VPC SC. When used withCloud Composer, VPC Service Controls have severalknown limitations.
Step 1. Create or choose an environment's service account
When you create an environment, you specify a service account. This serviceaccount is calledenvironment's service account. Your environment uses thisservice account to perform most of the operations.
The service account for your environment is not a user account. Aservice account is a special kind of account used by an application or avirtual machine (VM) instance, not a person.
You can't change the service account of your environment later.
Warning: Your environment's service account can havetoo broad permissions on your project. Because your environment runs DAGs onbehalf of your environment's service account, users who can add and modify DAGsin your environment's bucketcan run their code on behalf of the environment's service account andexercise all permissions of this account. Make sure that you are familiarwithsecurity considerations for environment's service accountsand understand how this account interacts with permissions and roles that yougrant to individual users in your project.If you don't have a service account for Cloud Composerenvironments in your project yet, create it.
SeeCreate environments (Terraform) for anextended example of creating a service account for your environment inTerraform.
Important: You can use the same service account for more than oneCloud Composer environment. In this case, if you grant extrapermissions to access resources in your project to this account, allenvironments that use it will get the same permissions.To create a new service account for your environment:
Create a new service account as described inthe Identity and Access Management documentation.
Grant a role to it, as described in the Identity and Access Managementdocumentation. The required role isComposer Worker (
composer.worker).If your environmentuses resource location restrictions,or installs PyPI packagesfrom an Artifact Registry repository orfrom a private repository, then granttheService Account User (
iam.serviceAccountUser) role to theuser-managed service account that runs your environment on itself(both the principal and the resource are the same service account).To access other resources in your Google Cloud project, grantextra permissions to access those resources to this service account.TheComposer Worker (
composer.worker) role provides this requiredset of permissions in most cases. Add extra permissions to this serviceaccount only when it's necessary for the operation of your DAGs.
Step 2. Basic setup
This step creates a Cloud Composer environment with defaultparameters in the specified location.
Note: All other steps in this guide explain how to customize and configuredifferent aspects of your environment. All of the remaining steps are optional.Console
In the Google Cloud console, go to theCreate environment page.
In theName field, enter a name for your environment.
The name must start with a lowercase letter followed by up to 62 lowercaseletters, numbers, or hyphens, and can't end with a hyphen. The environmentname is used to create subcomponents for the environment, so you must providea name that is also valid as a Cloud Storagebucket name. SeeBucket naming guidelines for a listof restrictions.
In theLocation drop-down list, choose a locationfor your environment.
A location is the region where the environment is located.
In theImage version drop-down list, selectaCloud Composer image with the requiredversion of Airflow.
Inin theNode configuration section, in theService account drop-down list,select a service account for your environment.
If you don't have a serviceaccount for your environment yet, seeCreate or choose an environment's service account.
gcloud
gcloudcomposerenvironmentscreateENVIRONMENT_NAME\--locationLOCATION\--image-versionIMAGE_VERSION\--service-account"SERVICE_ACCOUNT"Replace:
ENVIRONMENT_NAMEwith the name of the environment.The name must start with a lowercase letter followed by up to 62 lowercaseletters, numbers, or hyphens, and can't end with a hyphen. The environmentname is used to create subcomponents for the environment, so you must providea name that is also valid as a Cloud Storagebucket name. SeeBucket naming guidelines for a listof restrictions.
LOCATIONwith the region for the environment.A location is the region where the environment is located.
SERVICE_ACCOUNTwith the service account for your environment.IMAGE_VERSIONwith the name of a Cloud Composer image.
Example:
gcloudcomposerenvironmentscreateexample-environment\--locationus-central1\--image-versioncomposer-1.20.12-airflow-1.10.15\--service-account"example-account@example-project.iam.gserviceaccount.com"API
Construct anenvironments.create API request. Specify theconfiguration in theEnvironment resource.
{"name":"projects/PROJECT_ID/locations/LOCATION/environments/ENVIRONMENT_NAME","config":{"softwareConfig":{"imageVersion":"IMAGE_VERSION"},"nodeConfig":{"serviceAccount":"SERVICE_ACCOUNT"}}}Replace:
PROJECT_IDwith theProject ID.LOCATIONwith the region for the environment.A location is the region where the environment is located.
ENVIRONMENT_NAMEwith the environment name.The name must start with a lowercase letter followed by up to 62 lowercaseletters, numbers, or hyphens, and can't end with a hyphen. The environmentname is used to create subcomponents for the environment, so you must providea name that is also valid as a Cloud Storagebucket name. SeeBucket naming guidelines for a listof restrictions.
IMAGE_VERSIONwith the name of a Cloud Composer image.SERVICE_ACCOUNTwith the service account for your environment.
Example:
// POST https://composer.googleapis.com/v1/{parent=projects/*/locations/*}/environments{"name":"projects/example-project/locations/us-central1/environments/example-environment","config":{"softwareConfig":{"imageVersion":"composer-1.20.12-airflow-1.10.15"},"nodeConfig":{"serviceAccount":"example-account@example-project.iam.gserviceaccount.com"}}}Terraform
To create an environment with default parameters is a specified location,add the following resource block to your Terraform configuration and runterraform apply.
resource"google_composer_environment""example"{provider=google-betaname="ENVIRONMENT_NAME"region="LOCATION"config{software_config{image_version="IMAGE_VERSION"}node_config{service_account="SERVICE_ACCOUNT"}}}Replace:
ENVIRONMENT_NAMEwith the name of the environment.The name must start with a lowercase letter followed by up to 62 lowercaseletters, numbers, or hyphens, and can't end with a hyphen. The environmentname is used to create subcomponents for the environment, so you must providea name that is also valid as a Cloud Storagebucket name. SeeBucket naming guidelines for a listof restrictions.
LOCATIONwith the region for the environment.A location is the region where the environment is located.
IMAGE_VERSIONwith the name of a Cloud Composer image.SERVICE_ACCOUNTwith the service account for your environment.
Example:
resource"google_composer_environment""example"{provider=google-betaname="example-environment"region="us-central1"config{software_config{image_version="composer-1.20.12-airflow-1.10.15"}node_config{service_account="example-account@example-project.iam.gserviceaccount.com"}}}Step 3. (Optional) Configure environment scale and performance parameters
To specify the scale and performance configuration for your environment,provide the number of nodes in your environment's GKE clusterand select machine types for environment components.
Console
On theCreate environment page:
In theNode configuration section:
Enter theNode count.
Node count is the number of Google Kubernetes Engine nodes in the environment's cluster.By default, environments have 3 nodes.
You can change this value after you create your environment.
ChooseMachine type for nodes.
The machine type for nodes isCompute Engine machine typeused for cluster instances. This parameter determines the number of CPUs andthe amount of memory for your environment. The default machine type is
n1-standard-1.To change this value after you create your environment, you mustmanually reconfigure the environment cluster.
Enter theDisk size.
The disk size, in GB, for environment nodes. Each node in your environment hasthis amount of disk space. Select a larger disk size if you expect to store alarge volume of data in folders that are synchronized with environment VMs.For example, in the
/datafolder of your environment's bucket.The minimum size is 30 GB. The default size is 100 GB. You can'tchange this parameter after you create an environment.
Choose theNumber of schedulers.
Your environment can run more than one Airflow scheduler at the sametime. Use multiple schedulers to distribute load between severalscheduler instances for better performance and reliability.
Increasing the number of schedulers does not always improve Airflowperformance. For example, having only one scheduler might provide betterperformance than having two. This might happen when the extra scheduler is notutilized, and thus consumes resources of your environment without contributingto overall performance. The actual scheduler performance depends on thenumber of Airflow workers, the number of DAGs and tasks that run in yourenvironment, and the configuration of both Airflow and the environment.
We recommend starting with two schedulers and then monitoring the performanceof your environment. If you change the number of schedulers, you can alwaysscale your environment back to the original number of schedulers.
For more information about configuring multiple schedulers, seeAirflow documentation.
Expand theNetworking, Airflow config overrides, and additional features item.
In theCloud SQL configuration section, chooseCloud SQL machine type.
This parameter determines the machine type for theCloud SQL instance that runs the Airflowdatabase. The default Cloud SQL machine type is
db-n1-standard-2.In theWeb server configuration section, chooseWeb server machine type.
This parameter determines the machine type for theCompute Engine instance that runs the Airflow webserver.
The default web server machine type is
composer-n1-webserver-2.
gcloud
When you create an environment, following arguments control environmentscale and performance parameters:
--node-countspecifies the number of nodes in your environment.Node count is the number of Google Kubernetes Engine nodes in the environment's cluster.By default, environments have 3 nodes.
You can change this value after you create your environment.
--scheduler-countspecifies the number of schedulers in your environment.Your environment can run more than one Airflow scheduler at the sametime. Use multiple schedulers to distribute load between severalscheduler instances for better performance and reliability.
Increasing the number of schedulers does not always improve Airflowperformance. For example, having only one scheduler might provide betterperformance than having two. This might happen when the extra scheduler is notutilized, and thus consumes resources of your environment without contributingto overall performance. The actual scheduler performance depends on thenumber of Airflow workers, the number of DAGs and tasks that run in yourenvironment, and the configuration of both Airflow and the environment.
We recommend starting with two schedulers and then monitoring the performanceof your environment. If you change the number of schedulers, you can alwaysscale your environment back to the original number of schedulers.
For more information about configuring multiple schedulers, seeAirflow documentation.
--disk-sizespecifies the disk size for environment VMs.The disk size, in GB, for environment nodes. Each node in your environment hasthis amount of disk space. Select a larger disk size if you expect to store alarge volume of data in folders that are synchronized with environment VMs.For example, in the
/datafolder of your environment's bucket.The minimum size is 30 GB. The default size is 100 GB. You can'tchange this parameter after you create an environment.
--machine-typespecifies the machine type for node VMs.The machine type for nodes isCompute Engine machine typeused for cluster instances. This parameter determines the number of CPUs andthe amount of memory for your environment. The default machine type is
n1-standard-1.To change this value after you create your environment, you mustmanually reconfigure the environment cluster.
--cloud-sql-machine-typespecifies the machine type forthe Cloud SQL instance.This parameter determines the machine type for theCloud SQL instance that runs the Airflowdatabase. The default Cloud SQL machine type is
db-n1-standard-2.--web-server-machine-typespecifies the machine type for the Airflow webserver instance.This parameter determines the machine type for theCompute Engine instance that runs the Airflow webserver.
The default web server machine type is
composer-n1-webserver-2.
gcloudcomposerenvironmentscreateENVIRONMENT_NAME\--locationLOCATION\--image-versioncomposer-1.20.12-airflow-1.10.15\--service-account"SERVICE_ACCOUNT"\--zoneNODE_ZONE\--node-countNODE_COUNT\--scheduler-countSCHEDULER_COUNT\--disk-sizeDISK_SIZE\--machine-typeNODE_MACHINE_TYPE\--cloud-sql-machine-typeSQL_MACHINE_TYPE\--web-server-machine-typeWS_MACHINE_TYPEReplace:
NODE_COUNTwith the number of nodes.NODE_ZONEwith the Compute Engine zone for your environment VMs.SCHEDULER_COUNTwith the number of schedulers.DISK_SIZEwith the disk size for environment VMs, in GB.NODE_MACHINE_TYPEwith themachine type for node VMs.SQL_MACHINE_TYPEwith themachine type for the Cloud SQL instance.WS_MACHINE_TYPEwith themachine type for the Airflow web server instance.
Example:
gcloudcomposerenvironmentscreateexample-environment\--locationus-central1\--image-versioncomposer-1.20.12-airflow-1.10.15\--service-account"example-account@example-project.iam.gserviceaccount.com"\--zoneus-central1-a\--node-count6\--scheduler-count1\--disk-size50\--machine-typen1-standard-2\--cloud-sql-machine-typedb-n1-standard-2\--web-server-machine-typecomposer-n1-webserver-2API
When you create an environment, in theEnvironment>EnvironmentConfig resource, specifyenvironment scale and performance parameters.
{"name":"projects/PROJECT_ID/locations/LOCATION/environments/ENVIRONMENT_NAME","config":{"nodeCount":NODE_COUNT,"nodeConfig":{"machineType":"NODE_MACHINE_TYPE","diskSizeGb":DISK_SIZE,"serviceAccount":"SERVICE_ACCOUNT"},"softwareConfig":{"schedulerCount":SCHEDULER_COUNT},"databaseConfig":{"machineType":"SQL_MACHINE_TYPE"},"webServerConfig":{"machineType":"WS_MACHINE_TYPE"}}}Replace:
NODE_COUNTwith the number of nodes.DISK_SIZEwith the disk size for environment VMs, in GB.NODE_MACHINE_TYPEwith the machine typefor node VMs. This value must contain azone for your environment VMs.SCHEDULER_COUNTwith the number of schedulers.SQL_MACHINE_TYPEwith the machine typefor the Cloud SQL instance.WS_MACHINE_TYPEwith the machine typefor the Airflow web server instance.
Example:
// POST https://composer.googleapis.com/v1/{parent=projects/*/locations/*}/environments{"name":"projects/example-project/locations/us-central1/environments/example-environment","config":{"nodeCount":6,"nodeConfig":{"machineType":"projects/example-project/zones/us-central1-a/machineTypes/n1-standard-2","diskSizeGb":50,"serviceAccount":"example-account@example-project.iam.gserviceaccount.com"},"softwareConfig":{"schedulerCount":1},"databaseConfig":{"machineType":"db-n1-standard-2"},"webServerConfig":{"machineType":"composer-n1-webserver-2"}}}Terraform
When you create an environment, following fields control environment scaleand performance parameters:
node_countin thenode_configblock specifies the number of nodes inyour environment.Node count is the number of Google Kubernetes Engine nodes in the environment's cluster.By default, environments have 3 nodes.
You can change this value after you create your environment.
disk_size_gbin thenode_configblock specifies the disk size forenvironment VMs.The disk size, in GB, for environment nodes. Each node in your environment hasthis amount of disk space. Select a larger disk size if you expect to store alarge volume of data in folders that are synchronized with environment VMs.For example, in the
/datafolder of your environment's bucket.The minimum size is 30 GB. The default size is 100 GB. You can'tchange this parameter after you create an environment.
machine_typein thenode_configblock specifies the machine type fornode VMs. When you specify this field, also provideaCompute Engine zone for yourenvironment VMs in thezonefield.The machine type for nodes isCompute Engine machine typeused for cluster instances. This parameter determines the number of CPUs andthe amount of memory for your environment. The default machine type is
n1-standard-1.To change this value after you create your environment, you mustmanually reconfigure the environment cluster.
machine_typein thedatabase_configblock specifies the machine typefor the Cloud SQL instance.This parameter determines the machine type for theCloud SQL instance that runs the Airflowdatabase. The default Cloud SQL machine type is
db-n1-standard-2.machine_typein theweb_server_configblock specifies the machine typefor the Airflow web server instance.This parameter determines the machine type for theCompute Engine instance that runs the Airflow webserver.
The default web server machine type is
composer-n1-webserver-2.scheduler_countfield in thesoftware_configblock specifies thenumber of schedulers in your environment. Your environment must useAirflow 2.
resource"google_composer_environment""example"{name="ENVIRONMENT_NAME"region="LOCATION"config{node_config{node_count=NODE_COUNTdisk_size_gb=DISK_SIZEmachine_type="NODE_MACHINE_TYPE"zone="NODE_ZONE"service_account="SERVICE_ACCOUNT"}software_config{scheduler_count=SCHEDULER_COUNT}database_config{machine_type="SQL_MACHINE_TYPE"}web_server_config{machine_type="WS_MACHINE_TYPE"}}}Replace:
NODE_COUNTwith the number of nodes.DISK_SIZEwith the disk size for environment VMs, in GB.NODE_MACHINE_TYPEwith the machine typefor node VMs.NODE_ZONEwith the Compute Engine zone for your environment VMs.SCHEDULER_COUNTwith the number of schedulers.SQL_MACHINE_TYPEwith the machine typefor the Cloud SQL instance.WS_MACHINE_TYPEwith the machine typefor the Airflow web server instance.
Example:
resource"google_composer_environment""example"{name="example-environment"region="us-central1"config{node_config{node_count=4disk_size_gb=100zone="us-central1-a"machine_type="n1-standard-2"service_account="example-account@example-project.iam.gserviceaccount.com"}software_config{scheduler_count=2}database_config{machine_type="db-n1-standard-2"}web_server_config{machine_type="composer-n1-webserver-2"}}}Step 4. (Optional) Configure your environment's networking
Networking parameters depend on the type of environment that you want tocreate:
Public IP environment. Use the default networking parameters.
Private IP environment (VPC peerings). In this configuration, yourenvironment uses VPC peerings for connectivity.
Note: Cloud Composer 1 supports only private IP environments with VPCpeerings. Cloud Composer 2 environments can use both VPC peerings andPrivate Service Connect for connectivity in Private IP.Configure your Private IP environment:
- Configure your project's networking for Private IP environments.
- Specify other parameters for your Private IP environment, as describedfurther in this section.
For a Private IP environment with VPC peerings, you need to know:
- Your VPC network ID
- Your VPC subnetwork ID
Two secondary IP ranges in your VPC subnetwork:
- Secondary IP range for pods
- Secondary IP range for services
IP ranges for the components of the environment:
- IP range for the GKE control plane.
- Web server IP range.
- IP range for the Cloud SQL instance.
For aShared VPC environment, you must do additional networking setup forthe host project, then create a Public or a Private IP environment in aservice project. Follow the instructions on theConfiguring Shared VPC page.
Important: If you create an environment in the service project usingGoogle Cloud console, then your account must havethecompute.subnetworks.usepermission in the host project.Otherwise, the list of available subnetworks does not contain subnetworksfrom the host project. If you create an environment usinggcloud, API,or Terraform, then your account does not need this additional permission.For a Shared VPC environment, you need to know:
- Your host project VPC network ID
Your host project VPC subnetwork ID
Two secondary IP ranges in your host project VPC subnetwork:
- Secondary IP range for pods
- Secondary IP range for services
When creating aPublic IP Shared VPC environment, you still need tospecify your host project VPC network, subnetwork, and secondary IP rangesfor pods and services.
To create aVPC SC environment, you must create a service perimeter andthen create Private IP environments inside this perimeter. Follow theinstructions outlined inConfiguring VPC Service Controls.
Additional networking options for environments are:
- Privately used public IP addresses. If you want to use more IP addresses, your environment canprivately use certain public IP address ranges as internal, subnet IP address ranges for pods and services.
- Authorized networks. If you want to access the control plane of your Private IP environment using HTTPS, you can useauthorized networks to specify CIDR ranges that can do so.
- IP Masquerade agent. By using environments with the IP Masquerade agent, you can use many-to-one IP address translations in your environment's networking configurations. For more information about creating environments with IP Masquerade agent, seeEnable the IP Masquerade agent.
Console
To create a Private IP environment:
Make sure that your networking is configured for the type of environment that you want to create.
Expand theNetworking, Airflow config overrides, and additional features item.
In theNetwork configuration section, select theEnable VPC-native (using alias-IP) checkbox.
In theNetwork drop-down list, select your VPC network ID.
In theSubnetwork drop-down list, select your VPC subnetwork ID.
In thePod IP Address Allocation section, specify the secondary IP range for pods. You can use an existing secondary range in your VPC network, or specify a new one in the CIDR notation.
In theService IP Address Allocation section, specify the secondary IP range for services. You can use an existing secondary range in your VPC network, or specify a new one in the CIDR notation.
In thePrivate IP section, select theEnable private IP checkbox.
In theGKE cluster master private IP section, specify an IP range for the GKE control plane:
To use thedefault IP range for the region where your environment is located, selectDefault IP range.
To specify a custom IP range, selectCustom IP range and enter a range in the CIDR notation in theGKE cluster master private IP field.
Select the level access for the GKE control plane. The control plane has two endpoints. One endpoint is private, for use by cluster nodes and VMs. Another endpoint is public. You can specify the level of access for the public endpoint:
To enable access to the public endpoint from authorized networks, select theAccess master endpoint using its external IP address checkbox.
Using this option sets the level of access for the control plane to"Public endpoint access enabled, authorized networks enabled". This provides restricted access to the control plane from authorized networks. By default, no source IP addresses are specified. You can addauthorized networks to the cluster.
To disable access to the public endpoint from authorized networks, clear theAccess master endpoint using its external IP address checkbox.
Using this option sets the level of access for the control plane to"Public endpoint access disabled". This prevents all internet access to the control plane.
In theWeb Server private IP section, specify an IP range for the Airflow web server instance.
In theCloud SQL private IP section, specify an IP range forthe Cloud SQL instance.
Caution: The172.17.0.0/16rangeis reserved in Cloud SQL.
gcloud
Make sure that your networking is configured for the type of environment that you want to create.
When you create an environment, the following arguments controlthe networking parameters. If you omit a parameter, the default value isused.
--enable-private-environmentenables a Private IP environment.--enable-ip-aliasenables VPC Native using alias IPaddresses.This parameter is required when using
--enable-private-environmentorwhen configuring secondary ranges for pods and services.--networkspecifies your VPC network ID.--subnetworkspecifies your VPC subnetwork ID.--cluster-secondary-range-nameor--cluster-ipv4-cidrconfigures thethe secondary range for pods.--services-secondary-range-nameor--services-ipv4-cidrto configurethe secondary range for services.--master-ipv4-cidrspecifies a range for the GKEcontrol plane.
--web-server-ipv4-cidrspecifies a range for the Airflow web serverinstance.--cloud-sql-ipv4-cidrspecifies a range for the Cloud SQLinstance.
--enable-private-endpointcontrols the level access forthe GKE control plane. The control plane has twoendpoints. One endpoint is private, for use by cluster nodes and VMs.Another endpoint is public. You can specify the level of access for thepublic endpoint:To enable access to the public endpoint from authorized networks, omit the
--enable-private-endpointargument.Using this option sets the level of access for the control plane to"Public endpoint access enabled, authorized networks enabled". This provides restricted access to the control plane from authorized networks. By default, no source IP addresses are specified. You can addauthorized networks to the cluster.
To disable access to the public endpoint from authorized networks, specify the
--enable-private-endpointargument.Using this option sets the level of access for the control plane to"Public endpoint access disabled". This prevents all internet access to the control plane.
--enable-master-authorized-networksand--master-authorized-networksarguments configureauthorized networksfor your environment.--enable-privately-used-public-ipsconfiguresprivately used public IP addresses for your environment.--enable-ip-masq-agentenables the IP Masquerade agent.
Example (Private IP environment)
gcloudcomposerenvironmentscreateENVIRONMENT_NAME\--locationLOCATION\--image-versioncomposer-1.20.12-airflow-1.10.15\--service-account"SERVICE_ACCOUNT"\--enable-private-environment\--enable-ip-alias\--networkNETWORK_ID\--subnetworkSUBNETWORK_ID\--cluster-ipv4-cidrPODS_RANGE\--services-ipv4-cidrSERVICES_RANGE\--master-ipv4-cidrCONTROL_PLANE_RANGE\--web-server-ipv4-cidrWEB_SERVER_RANGE\--cloud-sql-ipv4-cidrSQL_RANGEReplace:
NETWORK_IDwith your VPC network ID.SUBNETWORK_IDwith your VPC subnetwork ID.PODS_RANGEwith the secondary range for pods.SERVICES_RANGEwith the secondary range for services.CONTROL_PLANE_RANGEwith the secondary range for the GKEcontrol plane.WEB_SERVER_RANGEwith the secondary range for the Airflow web serverinstance.
Caution: TheSQL_RANGEwith the range for the Cloud SQL instance.172.17.0.0/16rangeis reserved in Cloud SQL.
Step 5. (Optional) Add network tags
Networktags are applied to all node VMs in your environment'scluster. Tags are used to identify valid sources or targets for networkfirewalls. Each tag within the list must comply withRFC 1035.
For example, you might want to add network tags if you plan to restricttraffic for a Private IP environment with firewall rules.
Caution: You can't change network tags later. If you want to later configurefirewall rules that target only VMs in your environment's cluster, specifynetwork tags when you create your environment.Console
On theCreate environment page:
- Locate theNode configuration section.
- In theTags field, specify instance tags for node VMs.
gcloud
When you create an environment, following arguments control network tags:
--tagsspecifies a comma-separated list of network tags applied to allnode VMs.
gcloudcomposerenvironmentscreateENVIRONMENT_NAME\--locationLOCATION\--image-versioncomposer-1.20.12-airflow-1.10.15\--service-account"SERVICE_ACCOUNT"\--tagsTAGSReplace:
TAGSwith a comma-separated list of network tags.
Example:
gcloudcomposerenvironmentscreateexample-environment\--locationus-central1\--image-versioncomposer-1.20.12-airflow-1.10.15\--tagsgroup1,productionAPI
When you create an environment, in theEnvironment>EnvironmentConfig resource, specifynetwork tags for your environment.
{"name":"projects/PROJECT_ID/locations/LOCATION/environments/ENVIRONMENT_NAME","config":{"nodeConfig":{"tags":["TAG"],"serviceAccount":"SERVICE_ACCOUNT"}}}Replace:
TAGwith a network tag.
Example:
// POST https://composer.googleapis.com/v1/{parent=projects/*/locations/*}/environments{"name":"projects/example-project/locations/us-central1/environments/example-environment","config":{"nodeConfig":{"tags":["group1","production"],"serviceAccount":"example-account@example-project.iam.gserviceaccount.com"}}}Terraform
When you create an environment, following fields define network tags foryour environment:
tagsfield in thenode_configblock specifies a comma-separated listof network tags applied to all node VMs.
resource"google_composer_environment""example"{provider=google-betaname="ENVIRONMENT_NAME"region="LOCATION"config{node_config{tags=["TAGS"]service_account="SERVICE_ACCOUNT"}}}Replace:
TAGSwith a comma-separated list of network tags.
Example:
resource"google_composer_environment""example"{provider=google-betaname="example-environment"region="us-central1"config{node_config{tags=["group1","production"]service_account="example-account@example-project.iam.gserviceaccount.com"}}}Step 6. (Optional) Configure web server network access
The Airflow web server access parameters do not depend on the type of yourenvironment. Instead, you can configure web server access separately. Forexample, a Private IP environment can still have the Airflow UI accessiblefrom the internet.
You can't configure the allowed IP ranges using private IP addresses.
Console
On theCreate environment page, in theWeb server configurationsection:
To provide access to the Airflow web server from all IP addresses,selectAllow access from all IP addresses.
To restrict access only to specific IP ranges, selectAllow access only from specific IP addresses. In theIP rangefield, specify an IP range in the CIDR notation. In theDescriptionfield, specify an optional description for this range. If you want tospecify more than one range, clickAdd IP range.
To forbid access for all IP addresses, selectAllow access only fromspecific IP addresses and clickDelete item next to the empty rangeentry.
gcloud
When you create an environment, following arguments control web serveraccess level:
--web-server-allow-allprovides access to Airflow from all IP addresses.This is the default option.--web-server-allow-iprestricts access only to specific source IPranges. To specify several IP ranges, use this argument multiple times.--web-server-deny-allforbids access for all IP addresses.
gcloudcomposerenvironmentscreateENVIRONMENT_NAME\--locationLOCATION\--image-versioncomposer-1.20.12-airflow-1.10.15\--web-server-allow-ipip_range=WS_IP_RANGE,description=WS_RANGE_DESCRIPTIONReplace:
WS_IP_RANGEwith the IP range, in the CIDR notation, that can accessAirflow UI.WS_RANGE_DESCRIPTIONwith the description of the IP range.
Example:
gcloudcomposerenvironmentscreateexample-environment\--locationus-central1\--image-versioncomposer-1.20.12-airflow-1.10.15\--service-account"example-account@example-project.iam.gserviceaccount.com"\--web-server-allow-ipip_range=192.0.2.0/24,description="office net 1"\--web-server-allow-ipip_range=192.0.4.0/24,description="office net 3"API
When you create an environment, in theEnvironment>EnvironmentConfig resource, specify web serveraccess parameters.
To provide access to the Airflow web server from all IP addresses,omit
webServerNetworkAccessControl.To restrict access only to specific IP ranges, specify one or more rangesin
allowedIpRanges.To forbid access for all IP addresses, add
allowedIpRangesand make it anempty list. Do not specify IP ranges in it.
{"name":"projects/PROJECT_ID/locations/LOCATION/environments/ENVIRONMENT_NAME","config":{"webServerNetworkAccessControl":{"allowedIpRanges":[{"value":"WS_IP_RANGE","description":"WS_RANGE_DESCRIPTION"}]},"nodeConfig":{"serviceAccount":"SERVICE_ACCOUNT"}}}Replace:
WS_IP_RANGEwith the IP range, in the CIDR notation, that can accessAirflow UI.WS_RANGE_DESCRIPTIONwith the description of the IP range.
Example:
// POST https://composer.googleapis.com/v1/{parent=projects/*/locations/*}/environments{"name":"projects/example-project/locations/us-central1/environments/example-environment","config":{"webServerNetworkAccessControl":{"allowedIpRanges":[{"value":"192.0.2.0/24","description":"office net 1"},{"value":"192.0.4.0/24","description":"office net 3"}]},"nodeConfig":{"serviceAccount":"example-account@example-project.iam.gserviceaccount.com"}}}Terraform
When you create an environment, theallowed_ip_range block in theweb_server_network_access_control block contains IP ranges that can accessweb server.
resource"google_composer_environment""example"{provider=google-betaname="ENVIRONMENT_NAME"region="LOCATION"config{web_server_network_access_control{allowed_ip_range{value="WS_IP_RANGE"description="WS_RANGE_DESCRIPTION"}}node_config{service_account="SERVICE_ACCOUNT"}}}Replace:
WS_IP_RANGEwith the IP range, in the CIDR notation, that can accessAirflow UI.WS_RANGE_DESCRIPTIONwith the description of the IP range.
Example:
resource"google_composer_environment""example"{provider=google-betaname="example-environment"region="us-central1"config{web_server_network_access_control{allowed_ip_range{value="192.0.2.0/24"description="office net 1"},allowed_ip_range{value="192.0.4.0/24"description="office net 3"}}node_config{service_account="example-account@example-project.iam.gserviceaccount.com"}}Step 7. (Optional) Specify Airflow configuration overrides and environment variables
You can set upAirflow configuration overrides andenvironment variables when you create an environment. As analternative, you can do it later, after your environment is created.
Some Airflow configuration optionsare blocked and youcan't override them.
For the list of available Airflow configuration options, seeConfiguration reference for Airflow 2 andAirflow 1.10.*
To specify Airflow configuration overrides and environment variables:
Console
On theCreate environment page:
Expand theNetworking, Airflow config overrides, and additional features item.
In theEnvironment variables section, clickAdd environment variable.
Enter theName andValue for the environment variable.
In theAirflow configuration overrides section, clickAdd Airflow configuration override.
Enter theSection,Key, andValue for the configurationoption override.
For example:
Section Key Value webserverdag_orientationTB
gcloud
When you create an environment, following arguments control environmentvariables and Airflow configuration overrides:
--env-variablesspecifies a comma-separated list of environmentvariables.Variable names may contain upper and lowercase letters, digits, andunderscores, but they may not begin with a digit.
--airflow-configsspecifies a comma-separated list of keys and valuesfor Airflow configuration overrides.
gcloudcomposerenvironmentscreateENVIRONMENT_NAME\--locationLOCATION\--image-versioncomposer-1.20.12-airflow-1.10.15\--service-account"SERVICE_ACCOUNT"\--env-variablesENV_VARS\--airflow-configsCONFIG_OVERRIDESReplace:
ENV_VARSwith a list of comma-separatedNAME=VALUEpairs forenvironment variables.CONFIG_OVERRIDESwith a list of comma-separatedSECTION-KEY=VALUEpairs for configuration overrides. Separate the name of theconfiguration section with a-symbol, followed by the key name. Forexample:core-dags_are_paused_at_creation.
Example:
gcloudcomposerenvironmentscreateexample-environment\--locationus-central1\--image-versioncomposer-1.20.12-airflow-1.10.15\--service-account"example-account@example-project.iam.gserviceaccount.com"\--env-variablesSENDGRID_MAIL_FROM=user@example.com,SENDGRID_API_KEY=example-key\--airflow-configscore-dags_are_paused_at_creation=True,webserver-dag_orientation=TBAPI
When you create an environment, in theEnvironment>EnvironmentConfig resource, specifyenvironment variables and Airflow configuration overrides.
{"name":"projects/PROJECT_ID/locations/LOCATION/environments/ENVIRONMENT_NAME","config":{"softwareConfig":{"airflowConfigOverrides":{"SECTION-KEY":"OVERRIDE_VALUE"},"envVariables":{"VAR_NAME":"VAR_VALUE",}},"nodeConfig":{"serviceAccount":"SERVICE_ACCOUNT"}}}Replace:
SECTIONwith the section in the configuration file where the Airflowconfiguration option is located.KEYwith the name of the Airflow configuration option.OVERRIDE_VALUEwith a value of the Airflow configuration option.VAR_NAMEwith the name of the environment variable.VAR_VALUEwith the value of the environment variable.
Example:
// POST https://composer.googleapis.com/v1/{parent=projects/*/locations/*}/environments{"name":"projects/example-project/locations/us-central1/environments/example-environment","config":{"softwareConfig":{"airflowConfigOverrides":{"core-dags_are_paused_at_creation":"True","webserver-dag_orientation":"TB"},"envVariables":{"SENDGRID_MAIL_FROM":"user@example.com","SENDGRID_API_KEY":"example-key"}},"nodeConfig":{"serviceAccount":"example-account@example-project.iam.gserviceaccount.com"}}}Terraform
When you create an environment, following blocks control environmentvariables and Airflow configuration overrides:
env_variablesblock in thesoftware_configblock specifiesenvironment variables.Variable names may contain upper and lowercase letters, digits, andunderscores, but they may not begin with a digit.
airflow_config_overridesblock in thesoftware_configblock specifiesAirflow configuration overrides.
resource"google_composer_environment""example"{provider=google-betaname="ENVIRONMENT_NAME"region="LOCATION"config{software_config{airflow_config_overrides={SECTION-KEY="OVERRIDE_VALUE"}env_variables={VAR_NAME="VAR_VALUE"}}node_config{service_account="SERVICE_ACCOUNT"}}}Replace:
SECTIONwith the section in the configuration file where the Airflowconfiguration option is located.KEYwith the name of the Airflow configuration option.OVERRIDE_VALUEwith a value of the Airflow configuration option.VAR_NAMEwith the name of the environment variable.VAR_VALUEwith the value of the environment variable.
Example:
resource"google_composer_environment""example"{provider=google-betaname="example-environment"region="us-central1"config{software_config{airflow_config_overrides={core-dags_are_paused_at_creation="True"webserver-dag_orientation="TB"}env_variables={SENDGRID_MAIL_FROM="user@example.com"SENDGRID_API_KEY="example-key"}}node_config{service_account="example-account@example-project.iam.gserviceaccount.com"}}}Step 8. (Optional) Specify maintenance windows
By default, Cloud Composer 1 environments do not have definedmaintenance windows if you create them usingGoogle Cloud console, API, or Terraform. We recommend to specifymaintenance windows for your new and existing environments.
If you create your environment using gcloud CLI, your environmenthas default maintenance windows from 00:00:00 to 04:00:00 (GMT) on Friday,Saturday, and Sunday every week.
To specify custom maintenance windows for your environment:
Console
On theCreate environment page:
Expand theNetworking, Airflow config overrides, and additional features item.
In theMaintenance windows section, select theSet custom time for maintenance windows checkbox.
In theTimezone drop-down list, choose a time zone for maintenancewindows.
SetStart time,Days, andLength, so thatcombined time for the specified schedule is at least 12 hours in a 7-dayrolling window. For example, a period of 4 hours every Monday,Wednesday, and Friday provides the required amount of time.
gcloud
The following arguments define maintenance windows parameters:
--maintenance-window-startsets the start time of a maintenancewindow.--maintenance-window-endsets the end time of a maintenance window.--maintenance-window-recurrencesetsthemaintenance window recurrence.
gcloudcomposerenvironmentscreateENVIRONMENT_NAME\--locationLOCATION\--image-versioncomposer-1.20.12-airflow-1.10.15\--service-account"SERVICE_ACCOUNT"\--maintenance-window-start'DATETIME_START'\--maintenance-window-end'DATETIME_END'\--maintenance-window-recurrence'MAINTENANCE_RECURRENCE'Replace:
ENVIRONMENT_NAMEwith the name of the environment.DATETIME_STARTwith the start date and time in thedate/time input format. Only the specified time ofthe day is used, the specified date is ignored.DATETIME_ENDwith the end date and time in thedate/time input format. Only the specified time ofthe day is used, the specified date is ignored. The specified date andtime must be after the start date.MAINTENANCE_RECURRENCEwithanRFC 5545 RRULE for maintenancewindows recurrence. Cloud Composer supports two formats:The
FREQ=DAILYformat specifies a daily recurrence.The
FREQ=WEEKLY;BYDAY=SU,MO,TU,WE,TH,FR,SAformat specifies arecurrence on selected days of the week.
The following example specifies a 6-hour maintenance window between 01:00 and07:00 (UTC) on Wednesdays, Saturdays, and Sundays. The 1 January, 2023date is ignored.
gcloudcomposerenvironmentscreateexample-environment\--locationus-central1\--image-versioncomposer-1.20.12-airflow-1.10.15\--service-account"example-account@example-project.iam.gserviceaccount.com"\--maintenance-window-start'2023-01-01T01:00:00Z'\--maintenance-window-end'2023-01-01T07:00:00Z'\--maintenance-window-recurrence'FREQ=WEEKLY;BYDAY=SU,WE,SA'API
When you create an environment, in theEnvironment>EnvironmentConfig resource, specifymaintenance windows parameters:
{"name":"projects/PROJECT_ID/locations/LOCATION/environments/ENVIRONMENT_NAME","config":{"maintenanceWindow":{"startTime":"DATETIME_START","endTime":"DATETIME_END","recurrence":"MAINTENANCE_RECURRENCE"},"nodeConfig":{"serviceAccount":"SERVICE_ACCOUNT"}}}Replace:
DATETIME_STARTwith the start date and time in thedate/time input format. Only thespecified time of the day is used, the specified date is ignored.DATETIME_ENDwith the end date and time in thedate/time input format. Only thespecified time of the day is used, the specified date is ignored. Thespecified date and time must be after the start date.MAINTENANCE_RECURRENCEwith an RFC 5545 RRULE for maintenance windowsrecurrence. Cloud Composer supports two formats:The
FREQ=DAILYformat specifies a daily recurrence.The
FREQ=WEEKLY;BYDAY=SU,MO,TU,WE,TH,FR,SAformat specifies arecurrence on selected days of the week.
The following example specifies a 6-hour maintenance window between 01:00 and07:00 (UTC) on Wednesdays, Saturdays, and Sundays. The 1 January, 2023date is ignored.
Example:
// POST https://composer.googleapis.com/v1/{parent=projects/*/locations/*}/environments{"name":"projects/example-project/locations/us-central1/environments/example-environment","config":{"maintenanceWindow":{"startTime":"2023-01-01T01:00:00Z","endTime":"2023-01-01T07:00:00Z","recurrence":"FREQ=WEEKLY;BYDAY=SU,WE,SA"},"nodeConfig":{"serviceAccount":"SERVICE_ACCOUNT"}}}Terraform
Themaintenance_window block specifies the maintenance windows for yourenvironment:
resource"google_composer_environment""example"{provider=google-betaname="ENVIRONMENT_NAME"region="LOCATION"config{maintenance_window{start_time="DATETIME_START"end_time="DATETIME_END"recurrence="MAINTENANCE_RECURRENCE"}node_config{service_account="SERVICE_ACCOUNT"}}}Replace:
DATETIME_STARTwith the start date and time in thedate/time input format. Only thespecified time of the day is used, the specified date is ignored.DATETIME_ENDwith the end date and time in thedate/time input format. Only thespecified time of the day is used, the specified date is ignored. Thespecified date and time must be after the start date.MAINTENANCE_RECURRENCEwith an RFC 5545 RRULE for maintenance windowsrecurrence. Cloud Composer supports two formats:- The
FREQ=DAILYformat specifies a daily recurrence. - The
FREQ=WEEKLY;BYDAY=SU,MO,TU,WE,TH,FR,SAformat specifies arecurrence on selected days of the week.
- The
The following example specifies a 6-hour maintenance window between 01:00 and07:00 (UTC) on Wednesdays, Saturdays, and Sundays. The 1 January, 2023date is ignored.
resource"google_composer_environment""example"{provider=google-betaname="example-environment"region="us-central1"config{maintenance_window{start_time="2023-01-01T01:00:00Z"end_time="2023-01-01T07:00:00Z"recurrence="FREQ=WEEKLY;BYDAY=SU,WE,SA"}}}Step 9. (Optional) Configure data encryption (CMEK)
By default, data in your environment is encrypted with a key provided byGoogle.
To use customer-managed encryption keys (CMEK) to encrypt data in yourenvironment, follow the instructions outlined inUsing customer-managed encryption keys.
Step 10. (Optional) Specify environment labels
You can assign labels to your environments tobreak down billing costs based on these labels.
Console
On theCreate environment page:
Expand theNetworking, Airflow config overrides, and additional features item.
In theLabels section, clickAdd label.
InKey andValue fields, specify key and value pairs for theenvironment labels.
gcloud
When you create an environment, the--labels argument specifies a comma-separated list of keys and values with environment labels.
gcloudcomposerenvironmentscreateENVIRONMENT_NAME\--locationLOCATION\--image-versioncomposer-1.20.12-airflow-1.10.15\--service-account"SERVICE_ACCOUNT"\--labelsLABELSReplace:
LABELSwith a list of comma-separatedKEY=VALUEpairs for environmentlabels.
Example:
gcloudcomposerenvironmentscreateexample-environment\--locationus-central1\--image-versioncomposer-1.20.12-airflow-1.10.15\--service-account"example-account@example-project.iam.gserviceaccount.com"\--labelsowner=engineering-team,env=productionAPI
When you create an environment, in theEnvironmentresource, specify labels for your environment.
{"name":"projects/PROJECT_ID/locations/LOCATION/environments/ENVIRONMENT_NAME","labels":{"LABEL_KEY":"LABEL_VALUE"}}Replace:
LABEL_KEYwith a key of the environment label.LABEL_VALUEwith a value of the environment label.
Example:
// POST https://composer.googleapis.com/v1/{parent=projects/*/locations/*}/environments{"name":"projects/example-project/locations/us-central1/environments/example-environment","labels":{"owner":"engineering-team","env":"production"}}Terraform
When you create an environment, specify labels in thelabels block (outside of theconfig block).
resource"google_composer_environment""example"{provider=google-betaname="ENVIRONMENT_NAME"region="LOCATION"labels={LABEL_KEY="LABEL_VALUE"}}Replace:
LABEL_KEYwith a key of the environment label.LABEL_VALUEwith a value of the environment label.
Example:
resource"google_composer_environment""example"{provider=google-betaname="example-environment"region="us-central1"labels={owner="engineering-team"env="production"}}Step 11. (Optional) Configure other parameters
Other parameters include:
Zone for your environment nodes
Compute Engine zone in which to deploy cluster nodes. In thisparameter, you can select a specific zone in the location of yourenvironment.
By default, a random zone is selected automatically.
OAuth scopes
OAuth scopes are a set ofGoogle API scopes to be madeavailable on all node VMs. If empty, defaults to
https://www.googleapis.com/auth/cloud-platform.If you specify custom OAuth scopes, include
https://www.googleapis.com/auth/cloud-platformin the list of specifiedscopes.Python version
If your environment uses Airflow 1.10.* and earlier Airflow versions, youcan make your environment use Python 2. The default Python version isPython 3. For more information about Python 2 support inCloud Composer, seeSupported Python versions.
Console
On theCreate environment page:
In theNode configuration section:
In theZone drop-down list, select a zone for your environmentnodes.
You can't change zone later.
In theOAuth Scopes field, specify OAuth scopes for node VMs.
You can't change OAuth scopes later.
To specify several OAuth scopes, provide a comma-separated list ofvalues. Include
https://www.googleapis.com/auth/cloud-platformin the list of specified scopes.In thePython version field, choose the version of Python.
You can't change the Python version later.
gcloud
When you create an environment, following arguments control miscellaneousparameters of your environment:
--zonespecifies a Compute Engine zone for your environmentVMs.--oauth-scopesspecifies a comma-separted list of OAuth scopes.Includehttps://www.googleapis.com/auth/cloud-platformin the list of specified scopes.--python-versionspecifies the version of Python.
gcloudcomposerenvironmentscreateENVIRONMENT_NAME\--locationLOCATION\--image-versioncomposer-1.20.12-airflow-1.10.15\--service-account"SERVICE_ACCOUNT"\--zoneZONE\--oauth-scopesOAUTH_SCOPES\--python-versionPYTHON_VERSIONReplace:
ZONEwith the name of the Compute Engine zone.OAUTH_SCOPESwith a comma-separated list of OAuth scopes.PYTHON_VERSIONwith the Python version (3or2).
Example:
gcloudcomposerenvironmentscreateexample-environment\--locationus-central1\--image-versioncomposer-1.20.12-airflow-1.10.15\--service-account"example-account@example-project.iam.gserviceaccount.com"\--zoneus-central1-a\--oauth-scopeshttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/bigquery\--python-version3API
When you create an environment, in theEnvironment>EnvironmentConfig resource, specifymiscellaneous parameters of your environment.
{"name":"projects/PROJECT_ID/locations/LOCATION/environments/ENVIRONMENT_NAME","config":{"nodeConfig":{"location":"projects/PROJECT_ID/zones/ZONE","oauthScopes":["OAUTH_SCOPE"],"serviceAccount":"SERVICE_ACCOUNT"},"softwareConfig":{"pythonVersion":"PYTHON_VERSION"}}}Replace:
ZONEwith the name of the Compute Engine zone.OAUTH_SCOPEwith an OAuth scope. To specify additional scopes, addthehttps://www.googleapis.com/auth/cloud-platformscope, followed bythe additional scope items.scopes.PYTHON_VERSIONwith the Python version (3or2).
Example:
// POST https://composer.googleapis.com/v1/{parent=projects/*/locations/*}/environments{"name":"projects/example-project/locations/us-central1/environments/example-environment","config":{"nodeConfig":{"location":"projects/example-project/zones/us-central1-a","oauthScopes":["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/bigquery"],"serviceAccount":"example-account@example-project.iam.gserviceaccount.com"},"softwareConfig":{"pythonVersion":"3"}}}Terraform
When you create an environment, following fields control miscellaneousparameters of your environment:
zonefield in thenode_configblock specifies a Compute Enginezone for your environment VMs.oauth_scopesfield in thenode_configblock specifies a comma-separatedlist of OAuth scopes.python_versionfield in thesoftware_configblock specifies theversion of Python.
resource"google_composer_environment""example"{name="ENVIRONMENT_NAME"region="LOCATION"config{node_config{zone="ZONE"oauth_scopes="[OAUTH_SCOPES]"service_account="SERVICE_ACCOUNT"}software_config{python_version="PYTHON_VERSION"}}}Replace:
ZONEwith the name of the Compute Engine zone.OAUTH_SCOPESwith a comma-separated list of OAuth scopes.PYTHON_VERSIONwith the Python version (3or2).
Example:
resource"google_composer_environment""example"{name="example-environment"region="us-central1"config{node_config{zone="us-central1-a"oauth_scopes="[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/bigquery]"service_account="example-account@example-project.iam.gserviceaccount.com"}software_config{python_version="3"}}}Step 12. (Optional) Enforce Beta API usage
Preview — Enforcing beta API usage
This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of theService Specific Terms. Pre-GA features are available "as is" and might have limited support. For more information, see thelaunch stage descriptions.
You can explicitly make your environment use beta Cloud ComposerAPI, even if your environment does not have any preview features. If you doso, your environment is created using thev1beta1 service endpoint.
Console
On theCreate environment page:
Expand theNetworking, Airflow config overrides, and additional features item.
In theBeta API section, select theEnforce the usage of Beta APIcheckbox.
gcloud
Create your environment usingthegcloud beta composer command.
API
Create your environment using thev1beta1 serviceendpoint.
Terraform
The Terraform provider for Cloud Composer uses beta API bydefault.
What's next
- Troubleshooting environment creation
- Configuring Shared VPC
- Configuring VPC Service Controls
- Adding and updating DAGs
- Accessing Airflow UI
- Updating and deleting environments
- About Cloud Composer versions
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-17 UTC.