- Notifications
You must be signed in to change notification settings - Fork928
Closed
Description
The link-and-push workflow described in theFAQ fails at least on Coder v2.10.2+a11b169. It appears Coder is not traversing the link itself.
A simple template referencing a linked module directory thus:
module "example-module" { source = "./modules/aws-s3-static-website-bucket" bucket_name = "foo"}
Template directory:
➜ example ls -altotal 8drwxr-xr-x 6 jms staff 192 May 7 14:33 ./drwxr-xr-x 11 jms staff 352 May 7 14:29 ../drwxr-xr-x 4 jms staff 128 May 7 14:32 .terraform/-rw-r--r-- 1 jms staff 1406 May 7 14:33 .terraform.lock.hcl-rw-r--r-- 1 jms staff 346 May 7 14:32 main.tflrwxr-xr-x 1 jms staff 10 May 7 14:26 modules -> ../modules/
Module directory:
➜ example ls -al modules/total 0drwxr-xr-x 3 jms staff 96 Apr 16 19:35 ./drwxr-xr-x 11 jms staff 352 May 7 14:29 ../drwxr-xr-x 7 jms staff 224 Apr 16 19:33 aws-s3-static-website-bucket/
Commandtar --exclude='.terraform' -cvh . | coder -v templates push -y
fails with the following error:
==> ⧗ Detecting persistent resources2024-05-07 14:42:20.437-04:00 Error: Unreadable module directory2024-05-07 14:42:20.437-04:00 Unable to evaluate directory symlink: lstat modules: no such file or2024-05-07 14:42:20.437-04:00 directory2024-05-07 14:42:20.437-04:00 Error: Unreadable module directory2024-05-07 14:42:20.437-04:00 The directory could not be read for module "example-module" at main.tf:10.
Deleting the symlink and requesting Coder to push the same effective structure always succeeds:rm modules ; cp -R ../modules . ; tar --exclude='.terraform' -cvh . | coder -v templates push -y
And relinking and repeating always fails:rm -rf modules ; ln -sf ../modules modules ; tar --exclude='.terraform' -cvh . | coder -v templates push -y
Metadata
Metadata
Assignees
Labels
No labels