Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes for version #12

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading