You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EFS volumes (efs_volume_configuration or docker_volume_configuration) doesn't work with trussworks/terraform-aws-ecs-service v.6.6.0 using the module
#330
Describe the bug
EFS volumes (efs_volume_configuration or docker_volume_configuration) doesn't work with trussworks/terraform-aws-ecs-service v.6.6.0 using the module. I need to modify locally the ecs module main.tf and variables.tf and disable some unnecessary rows to make it happen.
Hi,
This is how I got the ECS EFS/docker/FSx volume configuration working at the same time with ECS. Are u able to verify and update the module codes? Thanks.
-- variables.tf
variable "container_volumes" {
description = "Volumes that containers in your task may use."
default = {}
type = any
}
-- main.tf / I have disabled some values from efs_volume_configuration, because I don't need it
dynamic "volume" {
for_each = var.container_volumes
content {
name = volume.value.name
Describe the bug
EFS volumes (efs_volume_configuration or docker_volume_configuration) doesn't work with trussworks/terraform-aws-ecs-service v.6.6.0 using the module. I need to modify locally the ecs module main.tf and variables.tf and disable some unnecessary rows to make it happen.
AWS CLI version: aws-cli/2.2.38
terraform v1.3.4
module "ecs-service" {
source = "trussworks/ecs-service/aws"
version ="6.6.0"
When using the ecs module, you can find from main.tf
dynamic "volume" {
for_each = var.container_volumes
content {
name = volume.value.name
}
}
and from variables.tf
variable "container_volumes" {
description = "Volumes that containers in your task may use."
default = []
type = list(
object({
name = string
})
)
}
So basically as default you can add only the name for container_volumes without any efs_volume_configuration or docker_volume_configuration
I need to modify locally main.tf and add extra information to enable mapping the efs volume configuration for ECS
dynamic "volume" {
for_each = var.container_volumes
content {
name = volume.value.name
}
and then add to variables.tf
variable "container_volumes" {
description = "Volumes that containers in your task may use."
type = list(object({
#host_path = string
name = string
# docker_volume_configuration = list(object({
# autoprovision = bool
# driver = string
# driver_opts = map(string)
# labels = map(string)
# scope = string
# }))
efs_volume_configuration = list(object({
file_system_id = string
root_directory = string
# transit_encryption = string
# transit_encryption_port = string
# authorization_config = list(object({
# access_point_id = string
# iam = string
# }))
}))
}))
default = []
}
The text was updated successfully, but these errors were encountered: