-
Notifications
You must be signed in to change notification settings - Fork 3
/
variables.tf
204 lines (168 loc) · 5.13 KB
/
variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
/******************************************
Google Cloud
*****************************************/
variable "project_id" {
type = string
description = "ID of the project where to create the Airflow Resources"
}
variable "region" {
type = string
description = "Region of the project where to create the Airflow Resources"
}
/******************************************
Cloud SQL
*****************************************/
variable "deploy_cloud_sql" {
type = bool
description = "Deploy Cloud SQL"
default = true
}
variable "sql_instance_name" {
type = string
description = "SQL instance name"
default = "airflow-db"
}
variable "sql_database_name" {
type = string
description = "SQL instance name"
default = "airflow"
}
variable "sql_user" {
type = string
description = "SQL instance name"
default = "airflow-root"
}
variable "sql_edition" {
type = string
description = "SQL edition. Can be ENTERPRISE or ENTERPRISE_PLUS"
default = "ENTERPRISE"
}
variable "sql_version" {
type = string
description = "SQL instance name"
default = "POSTGRES_15"
}
variable "sql_tier" {
type = string
description = "Tier of the sql database"
default = "db-custom-1-3840"
}
variable "sql_private_network" {
type = string
description = "Network where to create the SQL instance. Format projects/{project_id}/global/networks/{network_id}."
default = null
}
variable "allocated_ip_range" {
type = string
description = "Allocated IP range for the SQL instance"
default = null
}
variable "require_ssl" {
type = bool
description = "Require SSL for the SQL instance"
default = false
}
variable "sql_delete_protection" {
type = bool
description = "Delete protection for the SQL instance"
default = true
}
variable "sql_availability_type" {
type = string
description = "SQL availability type. Can be ZONAL or REGIONAL"
default = "ZONAL"
}
/******************************************
GitHub
*****************************************/
variable "deploy_github_keys" {
type = bool
description = "Create a GitHub Key and a secret in k8s to access the private dags"
default = true
}
variable "dags_repository" {
type = string
description = "Name of the GitHub repository where the DAGs are stored"
}
/******************************************
GKE
*****************************************/
variable "k8s_airflow_namespace" {
type = string
description = "Name of the Kubernetes namespace where the Airflow resources will be deployed"
}
variable "k8s_db_credentials_secret_name" {
type = string
description = "Name of the Kubernetes secret where the database credentials will be stored"
default = "airflow-db-credentials"
}
variable "k8s_webserver_secret_key_secret_name" {
type = string
description = "Name of the Kubernetes secret where webserver secret key will be stored"
default = "webserver-secret-key"
}
variable "k8s_airflow_fernet_key_secret_name" {
type = string
description = "Name of the Kubernetes secret where fernet key will be stored"
default = "fernet-key"
}
variable "k8s_git_sync_secret_name" {
type = string
description = "Name of the secret where the token to syncronize the dags in GitHub is stored"
default = "gitsync-creds"
}
/******************************************
Airflow Deployment
*****************************************/
variable "deploy_airflow" {
type = bool
description = "Deploy Airflow with the helm chart"
default = false
}
variable "airflow_version" {
type = string
description = "Airflow helm chart version"
default = "1.10.0"
}
variable "airflow_values_filepath" {
type = string
description = "Airflow helm chart values file path"
default = null
}
/******************************************
Airflow logging
*****************************************/
# If airflow_logs_bucket_name is set to null, no airflow logging resources will be created
variable "airflow_logs_bucket_name" {
type = string
description = "Name of the bucket in which to store the Airflow logs"
default = null
}
variable "airflow_logs_bucket_location" {
type = string
description = "Location of the bucket in which to store the Airflow logs"
default = "EU"
}
variable "airflow_logs_sa" {
type = string
description = "Service account with admin access to the bucket where Airflow writes the logs"
default = null
}
/******************************************
Reddis
*****************************************/
variable "create_redis_secrets" {
type = bool
description = "Create the redis secrets to be used by the helm chart"
default = true
}
variable "redis_password_secret_name" {
type = string
description = "Name of the secret that stores the redis password"
default = "airflow-redis-password"
}
variable "broker_url_secret_name" {
type = string
description = "Name of the secret that stores the redis password"
default = "airflow-broker-url"
}