Skip to content

paulkur/terraform-astrafy-gcp-airflow-module

 
 

Repository files navigation

terraform-astrafy-gcp-airflow-module

Terraform module to deploy Airflow in Google Cloud Platform

Requirements

Name Version
terraform >=0.13
github >= 5.36.0
google >= 4.74.0
google-beta >= 4.58.0
helm >= 2.11.0
kubernetes >= 2.18.1
random >= 3.4.3
tls >= 4.0.4

Providers

Name Version
github 5.38.0
google 4.83.0
helm 2.11.0
kubernetes 2.23.0
random 3.5.1
tls 4.0.4

Modules

No modules.

Resources

Name Type
github_repository_deploy_key.airflow_deploy_key resource
google_service_account.airflow_logger resource
google_sql_database.airflow resource
google_sql_database_instance.airflow_db resource
google_sql_user.db_user resource
google_storage_bucket.airflow_logs resource
google_storage_bucket_iam_member.airflow_logger_admin resource
helm_release.airflow resource
kubernetes_secret_v1.airflow_db_credentials resource
kubernetes_secret_v1.broker_url resource
kubernetes_secret_v1.fernet_key_secret resource
kubernetes_secret_v1.gitsync_creds resource
kubernetes_secret_v1.redis_password resource
kubernetes_secret_v1.webserver_secret_key resource
random_password.db_password resource
random_password.fernet_key resource
random_password.redis_password resource
random_password.webserver_secret_key resource
tls_private_key.github_deploy_key resource

Inputs

Name Description Type Default Required
airflow_logs_bucket_location Location of the bucket in which to store the Airflow logs string "EU" no
airflow_logs_bucket_name Name of the bucket in which to store the Airflow logs string null no
airflow_logs_sa Service account with admin access to the bucket where Airflow writes the logs string null no
airflow_values_filepath Airflow helm chart values file path string null no
airflow_version Airflow helm chart version string "1.10.0" no
allocated_ip_range Allocated IP range for the SQL instance string null no
broker_url_secret_name Name of the secret that stores the redis password string "airflow-broker-url" no
create_redis_secrets Create the redis secrets to be used by the helm chart bool true no
dags_repository Name of the GitHub repository where the DAGs are stored string n/a yes
deploy_airflow Deploy Airflow with the helm chart bool false no
deploy_cloud_sql Deploy Cloud SQL bool true no
deploy_github_keys Create a GitHub Key and a secret in k8s to access the private dags bool true no
k8s_airflow_fernet_key_secret_name Name of the Kubernetes secret where fernet key will be stored string "fernet-key" no
k8s_airflow_namespace Name of the Kubernetes namespace where the Airflow resources will be deployed string n/a yes
k8s_db_credentials_secret_name Name of the Kubernetes secret where the database credentials will be stored string "airflow-db-credentials" no
k8s_git_sync_secret_name Name of the secret where the token to syncronize the dags in GitHub is stored string "gitsync-creds" no
k8s_webserver_secret_key_secret_name Name of the Kubernetes secret where webserver secret key will be stored string "webserver-secret-key" no
project_id ID of the project where to create the Airflow Resources string n/a yes
redis_password_secret_name Name of the secret that stores the redis password string "airflow-redis-password" no
region Region of the project where to create the Airflow Resources string n/a yes
require_ssl Require SSL for the SQL instance bool false no
sql_database_name SQL instance name string "airflow" no
sql_delete_protection Delete protection for the SQL instance bool true no
sql_edition SQL edition. Can be ENTERPRISE or ENTERPRISE_PLUS string "ENTERPRISE" no
sql_instance_name SQL instance name string "airflow-db" no
sql_private_network Network where to create the SQL instance. Format projects/{project_id}/global/networks/{network_id}. string null no
sql_tier Tier of the sql database string "db-custom-1-3840" no
sql_user SQL instance name string "airflow-root" no
sql_version SQL instance name string "POSTGRES_15" no

Outputs

Name Description
airflow_db_credentials_secret n/a
airflow_fernet_key_secret n/a
airflow_git_sync_secret n/a
airflow_logger_sa n/a
airflow_webserver_secret_key_secret n/a

About

Terraform module to deploy Airflow in Google Cloud Platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 100.0%