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

Error when adding EFS volumes: When the volume parameter is specified, only one volume configuration type should be used. #185

Open
richstokes opened this issue Jan 11, 2023 · 3 comments
Labels
bug 🐛 An issue with the system

Comments

@richstokes
Copy link

Error: failed creating ECS Task Definition: ClientException: When the volume parameter is specified, only one volume configuration type should be used.

Terraform plan generates a change to the task definition which adds this:


      volume {

          host_path = "/test123"

          name      = "test123-efs"

 

          efs_volume_configuration {

              file_system_id          = "fs-123123123"

              root_directory          = "/test123"

              transit_encryption      = "ENABLED"

              transit_encryption_port = 2999

 

              authorization_config {

                  access_point_id = "fsap-123123123"

                  iam             = "DISABLED"

                }

            }

What actually works in AWS (by directly editing the JSON of a task), is this:


 

    "volumes": [

    {

      "fsxWindowsFileServerVolumeConfiguration": null,

      "efsVolumeConfiguration": {

        "transitEncryptionPort": null,

        "fileSystemId": "fs-123123123",

        "authorizationConfig": {

          "iam": "DISABLED",

          "accessPointId": "fsap-123123123"

        },

        "transitEncryption": "ENABLED",

        "rootDirectory": "/"

      },

      "name": "efs2",

      "host": null,

      "dockerVolumeConfiguration": null

    }

  ]

You can see the attribute names are slightly different, I'm not sure how much of that terraform translates, and how much is pointing to a bug with the module?

Currently on version 0.66.2 of the module, with terraform 1.3.2. Pretty confused since we do only have one volume configuration type set.

@richstokes richstokes added the bug 🐛 An issue with the system label Jan 11, 2023
@richstokes
Copy link
Author

richstokes commented Jan 11, 2023

Also of note, is the module requires the host_path directive with efs volume mounts, but that is specific to bind mounts, I believe and should not be set here.

@richstokes
Copy link
Author

Confirmed, if you set host_path to null, it works

@greg-pluto
Copy link

@richstokes Thanks Rich! This is still a thing with the current version of this module. host_path null was a great suggestion and resolved my issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

2 participants