From 67cbef8a91c4e835c8e74655a477219d2d23465c Mon Sep 17 00:00:00 2001 From: Zachary Hill Date: Wed, 4 Dec 2024 10:56:09 -0700 Subject: [PATCH] Added bucket name to the path for PATH homedirs (#99) * Added bucket name to the path for PATH homedirs * home_directory logic - Additional logic based on whether or not the home directory is `LOGICAL` or `PATH` - Sets the `home_directory` to null if type is `LOGICAL` --- modules/aws/transfer_family/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/aws/transfer_family/main.tf b/modules/aws/transfer_family/main.tf index a3eb9df9..475b4970 100755 --- a/modules/aws/transfer_family/main.tf +++ b/modules/aws/transfer_family/main.tf @@ -204,7 +204,7 @@ module "transfer_family_iam_role" { resource "aws_transfer_user" "this" { for_each = var.users - home_directory = each.value.home_directory + home_directory = each.value.home_directory_type == "LOGICAL" ? null : (each.value.home_directory == null ? "/${module.bucket.s3_bucket_id}" : "/${module.bucket.s3_bucket_id}/${each.value.home_directory}") home_directory_type = each.value.home_directory_type policy = each.value.home_directory_type == "LOGICAL" ? null : (each.value.policy == null ? local.default_session_policy : each.value.policy) role = module.transfer_family_iam_role.arn