diff --git a/README.md b/README.md index 980002d..851d89a 100644 --- a/README.md +++ b/README.md @@ -91,13 +91,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) | >= 5.39.0 | +| [aws](#requirement\_aws) | >= 6.11.0 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.39.0 | +| [aws](#provider\_aws) | >= 6.11.0 | ## Modules @@ -168,6 +168,7 @@ No modules. | [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 | | [weekly\_maintenance\_window\_start](#input\_weekly\_maintenance\_window\_start) | (Optional) Specifies the start date for the weekly maintenance window | `string` | `null` | no | +| [worker\_replacement\_strategy](#input\_worker\_replacement\_strategy) | (Optional) The worker replacement strategy to use for your environment. Possible options: FORCED (default) and GRACEFUL | `string` | `"FORCED"` | no | ## Outputs diff --git a/main.tf b/main.tf index 1287293..3797c9b 100644 --- a/main.tf +++ b/main.tf @@ -19,6 +19,7 @@ resource "aws_mwaa_environment" "mwaa" { schedulers = var.schedulers execution_role_arn = local.execution_role_arn airflow_configuration_options = local.airflow_configuration_options + worker_replacement_strategy = var.worker_replacement_strategy source_bucket_arn = local.source_bucket_arn webserver_access_mode = var.webserver_access_mode diff --git a/variables.tf b/variables.tf index c23b1b4..5f8a10a 100644 --- a/variables.tf +++ b/variables.tf @@ -78,6 +78,17 @@ variable "min_workers" { default = 1 } +variable "worker_replacement_strategy" { + description = "(Optional) The worker replacement strategy to use for your environment. Possible options: FORCED (default) and GRACEFUL" + type = string + default = "FORCED" + + validation { + condition = contains(["FORCED", "GRACEFUL"], var.worker_replacement_strategy) + error_message = "Invalid input, options: \"FORCED\", \"GRACEFUL\"." + } +} + variable "plugins_s3_object_version" { description = "(Optional) The plugins.zip file version you want to use." type = string diff --git a/versions.tf b/versions.tf index e98b4ca..1a3a09d 100644 --- a/versions.tf +++ b/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.39.0" + version = ">= 6.11.0" } } }