Skip to content

Commit

Permalink
- Add external EFS example to worker (with authorization config)
Browse files Browse the repository at this point in the history
- Fix efs_authorization_config variable type, provide defaults
  • Loading branch information
AutomationD committed Oct 16, 2024
1 parent 0560c36 commit f3280aa
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 10 additions & 0 deletions examples/complete-worker/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ module "worker_complete" {
docker_container_command = ["echo", "command-output"]
deployment_minimum_healthy_percent = 0

# EFS settings (external)
efs_enabled = true
efs_file_system_id = module.efs_data.id
efs_mount_point = "/mnt/efs"
efs_root_directory = "/"
efs_authorization_config = {
access_point_id = module.efs_data.access_points.posix_example.id
iam = "ENABLED"
}

# Network
vpc_id = module.vpc.vpc_id
private_subnets = module.vpc.private_subnets
Expand Down
10 changes: 8 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -610,9 +610,15 @@ variable "efs_root_directory" {
}

variable "efs_authorization_config" {
type = object({})
type = object({
access_point_id = string
iam = string
})
description = "EFS authorization config"
default = {}
default = {
access_point_id = null
iam = "ENABLED"
}
}

variable "efs_access_points" {
Expand Down

0 comments on commit f3280aa

Please sign in to comment.