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

Added support to specify FSx Windows file server volumes #166

Merged
merged 4 commits into from
Jul 6, 2022

Conversation

gauravkohli
Copy link
Contributor

what

  • Currently we can only add Docker/EFS volumes to the ECS task definition. With this PR added support to add FSx Windows file server volumes to the ECS task definitions.

why

  • We need to deploy ECS task which runs on Windows EC2 instances and be able to access FSx volumes and with this PR it's possible to configure that now.

references

@gauravkohli gauravkohli requested review from a team as code owners June 28, 2022 14:03
@gauravkohli gauravkohli requested review from nitrocode and RothAndrew and removed request for a team June 28, 2022 14:03
@gauravkohli
Copy link
Contributor Author

/test all

@gauravkohli
Copy link
Contributor Author

gauravkohli commented Jun 30, 2022

@nitrocode / @Gowiem / @joe-niland ... can anyone have a look at this PR.

@Gowiem
Copy link
Member

Gowiem commented Jun 30, 2022

/test all

Copy link
Member

@Gowiem Gowiem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gauravkohli This looks solid to me -- Well done.

Before we merge, I would like a second set of eyes on this code since it's so deeply nested. @nitrocode or @joe-niland mind putting eyes on this?

Copy link
Member

@joe-niland joe-niland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Gowiem it looks logically correct. I don't think we have an easy way of testing it with the current setup as it will require creating a Windows ECS task.

variables.tf Outdated
@@ -279,7 +279,7 @@ variable "efs_volumes" {
}))
}))

description = "Task EFS volume definitions as list of configuration objects. You cannot define both Docker volumes and EFS volumes on the same task definition."
description = "Task EFS volume definitions as list of configuration objects. You can define only one of Docker volumes, EFS volumes and FSx volumes on the same task definition."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gauravkohli just wanted to clarify the var description: when you say "one of" does that mean "one of each type" or "one type"? It seems mixing types is supported (just based on the AWS docs)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joe-niland .. comment change was just following the old comment which looks like meant we can only have either Docker volumes or EFS volumes on the same task definition. So I added we can only have one type, but multiple volumes of the same type.

But then I tested it on the ECS task and actually as you said we can indeed mix types, so we can have a task definition that can have all Docker, EFS & Fsx volumes attached to it and AWS doesn't complain about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe useful info to add would be that the list fsx_windows_file_server_volume_configuration can only have one element, as that list is used for the dynamic volume block, and each volume block can only have one of fsx_windows_file_server_volume_configuration

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gauravkohli that sounds like a good change, as well as perhaps changing 'only one of' to 'multiple'?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joe-niland .. implemented the suggestion. Can we go ahead and merge this PR now?

@joe-niland
Copy link
Member

/test all

@joe-niland joe-niland merged commit 07cd6ae into cloudposse:master Jul 6, 2022
@joe-niland
Copy link
Member

Thanks for your contribution @gauravkohli - released

draring pushed a commit to SevenPicoForks/terraform-aws-ecs-alb-service-task that referenced this pull request Feb 17, 2023
…alb-service-task

* 'master' of github.com:SevenPicoForks/terraform-aws-ecs-alb-service-task:
  fixes: Changing task_exec_policy_arns or task_policy_arns cause recreations cloudposse#167 (cloudposse#178)
  make `host_path` optional for fargate (cloudposse#176)
  Adding support for bind mount volume types (cloudposse#173)
  Update README.md and docs (cloudposse#171)
  Set bool inputs to type bool (cloudposse#170)
  Add ecs_service_enabled (cloudposse#169)
  BUG | Support Dynamic deployment_circuit_breaker for CODE_DEPLOY  (cloudposse#165)
  Added support to specify FSx Windows file server volumes (cloudposse#166)
  git-xargs programmatic commit (cloudposse#163)

# Conflicts:
#	main.tf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants