Skip to content

Commit

Permalink
Add EFS Authorization config linked to the share created by a module …
Browse files Browse the repository at this point in the history
…or pass-in external config
  • Loading branch information
AutomationD committed Oct 14, 2024
1 parent a1a2f9b commit 7682af9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,17 @@ locals {
"readOnly" = null
}

# We are using efs share that is created by this module or existing efs file system
efs_volume_configuration = [
{
file_system_id : var.efs_share_create ? module.efs.id : var.efs_file_system_id
root_directory : var.efs_root_directory
transit_encryption : "ENABLED"
transit_encryption_port : 2999
authorization_config = {}
authorization_config : var.efs_share_create ? {
access_point_id : module.efs.access_point_ids[0]
iam : "ENABLED"
} : var.efs_authorization_config
}
]
}
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,12 @@ variable "efs_root_directory" {
default = "/"
}

variable "efs_authorization_config" {
type = object({})
description = "EFS authorization config"
default = {}
}

variable "ecs_service_deployed" {
type = bool
description = "This service resource doesn't have task definition lifecycle policy, so terraform is used to deploy it (instead of ecs cli or ize)"
Expand Down

0 comments on commit 7682af9

Please sign in to comment.