airflow.providers.google.cloud.example_dags.example_compute

Example Airflow DAG that starts, stops and sets the machine type of a Google Compute Engine instance.

This DAG relies on the following OS environment variables

  • GCP_PROJECT_ID - Google Cloud project where the Compute Engine instance exists.

  • GCE_ZONE - Google Cloud zone where the instance exists.

  • GCE_INSTANCE - Name of the Compute Engine instance.

  • GCE_SHORT_MACHINE_TYPE_NAME - Machine type resource name to set, e.g. ‘n1-standard-1’.

    See https://cloud.google.com/compute/docs/machine-types

Module Contents

airflow.providers.google.cloud.example_dags.example_compute.GCP_PROJECT_ID[source]
airflow.providers.google.cloud.example_dags.example_compute.GCE_ZONE[source]
airflow.providers.google.cloud.example_dags.example_compute.GCE_INSTANCE[source]
airflow.providers.google.cloud.example_dags.example_compute.GCE_SHORT_MACHINE_TYPE_NAME[source]
airflow.providers.google.cloud.example_dags.example_compute.gce_instance_start[source]

Was this entry helpful?