Add Support to Import Environment Variables in AWS MWAA

Current Terraform Version

1.1.7

Use-cases

Add Support to Import Environment Variables in AWS MWAA. I would want to import Airflow environment variables in terraform. Probably adding support to import Json directly from terraform itself

Attempted Solutions

resource “aws_mwaa_environment” “test” {
airflow_configuration_options = {
“bucket” = “{var.source_bucket_name}" "cluster_name" = "{var.mwaa_name}”
“folder_prefix” = “messages”
“output_prefix” = “messages_parquet”
}

Proposal

resource “aws_mwaa_environment” “test” {
airflow_configuration_options = {
“bucket” = “{var.source_bucket_name}" "cluster_name" = "{var.mwaa_name}”
“folder_prefix” = “messages”
“output_prefix” = “messages_parquet”
}

( OR )

resource “aws_mwaa_environment” “test” {
airflow_configuration_options = {
file(./var.json)
}

1 Like