Skip to content

Commit

Permalink
feat: startup scripts from MWAA resource (#116) (#120)
Browse files Browse the repository at this point in the history
* feat: startup scripts from MWAA resource (#116)

Co-authored-by: Barry Steyn <[email protected]>

* terraform-docs: automated action

---------

Co-authored-by: Barry Steyn <[email protected]>
Co-authored-by: Barry Steyn <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Apr 28, 2023
1 parent 399850c commit 3b5a199
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ No modules.
| <a name="input_scheduler_logs_enabled"></a> [scheduler\_logs\_enabled](#input\_scheduler\_logs\_enabled) | n/a | `bool` | `true` | no |
| <a name="input_scheduler_logs_level"></a> [scheduler\_logs\_level](#input\_scheduler\_logs\_level) | One of: DEBUG, INFO, WARNING, ERROR, CRITICAL | `string` | `"WARNING"` | no |
| <a name="input_source_bucket_arn"></a> [source\_bucket\_arn](#input\_source\_bucket\_arn) | ARN of the bucket in which DAGs, Plugin and Requirements are put | `string` | n/a | yes |
| <a name="input_startup_script_s3_object_version"></a> [startup\_script\_s3\_object\_version](#input\_startup\_script\_s3\_object\_version) | n/a | `string` | `null` | no |
| <a name="input_startup_script_s3_path"></a> [startup\_script\_s3\_path](#input\_startup\_script\_s3\_path) | The relative path to the script hosted in your bucket. The script runs as your environment starts before starting the Apache Airflow process. | `string` | `null` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | tags and logging | `map(string)` | `{}` | no |
| <a name="input_task_logs_enabled"></a> [task\_logs\_enabled](#input\_task\_logs\_enabled) | n/a | `bool` | `true` | no |
| <a name="input_task_logs_level"></a> [task\_logs\_level](#input\_task\_logs\_level) | One of: DEBUG, INFO, WARNING, ERROR, CRITICAL | `string` | `"INFO"` | no |
Expand Down
14 changes: 8 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ resource "aws_mwaa_environment" "this" {
environment_class = var.environment_class
airflow_version = var.airflow_version

source_bucket_arn = var.source_bucket_arn
dag_s3_path = var.dag_s3_path
plugins_s3_path = var.plugins_s3_path
plugins_s3_object_version = var.plugins_s3_object_version
requirements_s3_path = var.requirements_s3_path
requirements_s3_object_version = var.requirements_s3_object_version
source_bucket_arn = var.source_bucket_arn
dag_s3_path = var.dag_s3_path
plugins_s3_path = var.plugins_s3_path
plugins_s3_object_version = var.plugins_s3_object_version
requirements_s3_path = var.requirements_s3_path
requirements_s3_object_version = var.requirements_s3_object_version
startup_script_s3_path = var.startup_script_s3_path
startup_script_s3_object_version = var.startup_script_s3_object_version

logging_configuration {
dag_processing_logs {
Expand Down
9 changes: 9 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ variable "requirements_s3_object_version" {
default = null
type = string
}
variable "startup_script_s3_path" {
type = string
description = "The relative path to the script hosted in your bucket. The script runs as your environment starts before starting the Apache Airflow process."
default = null
}
variable "startup_script_s3_object_version" {
default = null
type = string
}

# airflow.cfg values
variable "airflow_configuration_options" {
Expand Down

0 comments on commit 3b5a199

Please sign in to comment.