diff --git a/README.md b/README.md index 2a93ec9..9a4b244 100644 --- a/README.md +++ b/README.md @@ -86,13 +86,13 @@ Apache-2.0 Licensed. See [LICENSE](https://github.com/aws-ia/terraform-aws-mwaa/ | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0.0 | -| [aws](#requirement\_aws) | >= 4.20.0 | +| [aws](#requirement\_aws) | >= 4.63.0 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.20.0 | +| [aws](#provider\_aws) | >= 4.63.0 | ## Modules @@ -146,13 +146,15 @@ No modules. | [plugins\_s3\_object\_version](#input\_plugins\_s3\_object\_version) | (Optional) The plugins.zip file version you want to use. | `string` | `null` | no | | [plugins\_s3\_path](#input\_plugins\_s3\_path) | (Optional) The relative path to the plugins.zip file on your Amazon S3 storage bucket. For example, plugins.zip. If a relative path is provided in the request, then plugins\_s3\_object\_version is required. | `string` | `null` | no | | [private\_subnet\_ids](#input\_private\_subnet\_ids) | (Required) The private subnet IDs in which the environment should be created.
MWAA requires two subnets. | `list(string)` | n/a | yes | -| [requirements\_s3\_object\_version](#input\_requirements\_s3\_object\_version) | Optional) The requirements.txt file version you want to use. | `string` | `null` | no | +| [requirements\_s3\_object\_version](#input\_requirements\_s3\_object\_version) | (Optional) The requirements.txt file version you want to use. | `string` | `null` | no | | [requirements\_s3\_path](#input\_requirements\_s3\_path) | (Optional) The relative path to the requirements.txt file on your Amazon S3 storage bucket. For example, requirements.txt. If a relative path is provided in the request, then requirements\_s3\_object\_version is required. | `string` | `null` | no | | [schedulers](#input\_schedulers) | (Optional) The number of schedulers that you want to run in your environment. | `string` | `null` | no | | [security\_group\_ids](#input\_security\_group\_ids) | Security group IDs for MWAA | `list(string)` | `[]` | no | | [source\_bucket\_arn](#input\_source\_bucket\_arn) | (Required) The Amazon Resource Name (ARN) of your Amazon S3 storage bucket. For example, arn:aws:s3:::airflow-mybucketname | `string` | `null` | no | | [source\_bucket\_name](#input\_source\_bucket\_name) | New bucket will be created with the given name for MWAA when create\_s3\_bucket=true | `string` | `null` | no | | [source\_cidr](#input\_source\_cidr) | (Required) Source CIDR block which will be allowed on MWAA SG to access Airflow UI
Used only if `create_security_group=true` | `list(string)` | `[]` | no | +| [startup\_script\_s3\_object\_version](#input\_startup\_script\_s3\_object\_version) | (Optional) The version of the startup shell script you want to use. You must specify the version ID that Amazon S3 assigns to the file every time you update the script. | `string` | `null` | no | +| [startup\_script\_s3\_path](#input\_startup\_script\_s3\_path) | (Optional) The relative path to the script hosted in your bucket. The script runs as your environment starts before starting the Apache Airflow process. Use this script to install dependencies, modify configuration options, and set environment variables. | `string` | `null` | no | | [tags](#input\_tags) | (Optional) A map of resource tags to associate with the resource | `map(string)` | `{}` | no | | [vpc\_id](#input\_vpc\_id) | (Required) VPC ID to deploy the MWAA Environment.
Mandatory if `create_security_group=true` | `string` | `""` | no | | [webserver\_access\_mode](#input\_webserver\_access\_mode) | (Optional) Specifies whether the webserver should be accessible over the internet or via your specified VPC. Possible options: PRIVATE\_ONLY (default) and PUBLIC\_ONLY | `string` | `"PRIVATE_ONLY"` | no | diff --git a/main.tf b/main.tf index 1255f85..9b9ecd4 100644 --- a/main.tf +++ b/main.tf @@ -9,14 +9,16 @@ resource "aws_mwaa_environment" "mwaa" { max_workers = var.max_workers kms_key = var.kms_key - dag_s3_path = var.dag_s3_path - plugins_s3_object_version = var.plugins_s3_object_version - plugins_s3_path = var.plugins_s3_path - requirements_s3_path = var.requirements_s3_path - requirements_s3_object_version = var.requirements_s3_object_version - schedulers = var.schedulers - execution_role_arn = local.execution_role_arn - airflow_configuration_options = local.airflow_configuration_options + dag_s3_path = var.dag_s3_path + plugins_s3_object_version = var.plugins_s3_object_version + plugins_s3_path = var.plugins_s3_path + 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 + schedulers = var.schedulers + execution_role_arn = local.execution_role_arn + airflow_configuration_options = local.airflow_configuration_options source_bucket_arn = local.source_bucket_arn webserver_access_mode = var.webserver_access_mode diff --git a/variables.tf b/variables.tf index f9442ec..80ed7fc 100644 --- a/variables.tf +++ b/variables.tf @@ -79,7 +79,7 @@ variable "min_workers" { } variable "plugins_s3_object_version" { - description = " (Optional) The plugins.zip file version you want to use." + description = "(Optional) The plugins.zip file version you want to use." type = string default = null } @@ -90,12 +90,30 @@ variable "plugins_s3_path" { default = null } +variable "requirements_s3_object_version" { + description = "(Optional) The requirements.txt file version you want to use." + type = string + default = null +} + variable "requirements_s3_path" { description = "(Optional) The relative path to the requirements.txt file on your Amazon S3 storage bucket. For example, requirements.txt. If a relative path is provided in the request, then requirements_s3_object_version is required." type = string default = null } +variable "startup_script_s3_object_version" { + description = "(Optional) The version of the startup shell script you want to use. You must specify the version ID that Amazon S3 assigns to the file every time you update the script." + type = string + default = null +} + +variable "startup_script_s3_path" { + description = "(Optional) The relative path to the script hosted in your bucket. The script runs as your environment starts before starting the Apache Airflow process. Use this script to install dependencies, modify configuration options, and set environment variables." + type = string + default = null +} + variable "schedulers" { description = "(Optional) The number of schedulers that you want to run in your environment." type = string @@ -226,9 +244,3 @@ variable "source_cidr" { type = list(string) default = [] } - -variable "requirements_s3_object_version" { - description = "Optional) The requirements.txt file version you want to use." - type = string - default = null -} diff --git a/versions.tf b/versions.tf index 608cdda..b398951 100644 --- a/versions.tf +++ b/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.20.0" + version = ">= 4.63.0" } } }