Skip to content

Commit

Permalink
changes for version
Browse files Browse the repository at this point in the history
  • Loading branch information
dbangasbp committed Aug 12, 2024
1 parent 9f5b06f commit 1e6e1f3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 18 deletions.
39 changes: 21 additions & 18 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ locals {
policy = var.policy != null ? var.policy : null
partition = data.aws_partition.current.partition
s3_bucket_arn = var.create_s3_bucket ? module.s3_bucket[0].arn : var.source_bucket_arn
plugins_s3_path = length(var.plugins_s3_path) > 0 ? var.plugins_s3_path : "plugins.zip"
requirements_s3_path = length(var.requirements_s3_path) > 0 ? var.requirements_s3_path : "requirements.txt"
startup_script_s3_path = length(var.startup_script_s3_path) > 0 ? var.startup_script_s3_path : "startup.sh"


security_group_ids = var.create_security_group ? concat(var.associated_security_group_ids, aws_security_group.mwaa[*].id) : var.associated_security_group_ids
}

Expand Down Expand Up @@ -43,24 +45,25 @@ resource "aws_mwaa_environment" "default" {
#checkov:skip=CKV_AWS_242
#checkov:skip=CKV_AWS_244

name = var.name
airflow_configuration_options = var.airflow_configuration_options
airflow_version = var.airflow_version
dag_s3_path = var.dag_s3_path
environment_class = var.environment_class
endpoint_management = var.endpoint_management
kms_key = var.kms_key_arn
max_workers = var.max_workers
min_workers = var.min_workers
plugins_s3_object_version = var.plugins_s3_object_version
plugins_s3_path = var.plugins_s3_path
requirements_s3_object_version = var.requirements_s3_object_version
requirements_s3_path = local.requirements_s3_path
startup_script_s3_path = local.startup_script_s3_path
webserver_access_mode = var.webserver_access_mode
weekly_maintenance_window_start = var.weekly_maintenance_window_start
source_bucket_arn = local.s3_bucket_arn
execution_role_arn = local.execution_role_arn
name = var.name
airflow_configuration_options = var.airflow_configuration_options
airflow_version = var.airflow_version
dag_s3_path = var.dag_s3_path
environment_class = var.environment_class
endpoint_management = var.endpoint_management
kms_key = var.kms_key_arn
max_workers = var.max_workers
min_workers = var.min_workers
plugins_s3_object_version = var.plugins_s3_object_version
plugins_s3_path = local.plugins_s3_path
requirements_s3_object_version = var.requirements_s3_object_version
requirements_s3_path = local.requirements_s3_path
startup_script_s3_path = local.startup_script_s3_path
startup_script_s3_object_version = var.startup_script_s3_path_version
webserver_access_mode = var.webserver_access_mode
weekly_maintenance_window_start = var.weekly_maintenance_window_start
source_bucket_arn = local.s3_bucket_arn
execution_role_arn = local.execution_role_arn

logging_configuration {
dag_processing_logs {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ variable "startup_script_s3_path" {
description = "The relative path to the startup script on your Amazon S3 storage bucket. For example, startup.sh"
}

variable "startup_script_s3_path_version" {
type = string
default = null
description = "The version of the startup script on your Amazon S3 storage bucket."
}

variable "permissions_boundary" {
type = string
default = null
Expand Down

0 comments on commit 1e6e1f3

Please sign in to comment.