tofu-controller
tofu-controller copied to clipboard
Add support for symbolic links inside a terraform workspace
Hello, I have a terraform workspace that looks like this: |- mycluster01 |--- myapp01 |----- main.tf |----- common.tf |--- myapp02 |----- main.tf |----- common.tf
This works fine when I declare a Terraform object with this path (which is relative to the root of the gitRepository declared beforehand):
path: ./mycluster01/myapp01
Now, the common.tf file is the same for both project, so I would like to move it under "mycluster01", and then create symlinks inside folders myapp01 and myapp02: common.tf -> ../common.tf
When I do that, terraform behaves well and creates the plan accordingly on my local machine.
However, it seems that the runner doesn't like symlinks:
Error: Insufficient features blocks
on <empty> line 0:
(source code not available)
At least 1 "features" blocks are required.
{"level":"error","ts":"2022-10-13T10:47:05.830Z","logger":"runner.terraform","msg":"error creating the plan","error":"exit status 1\n\nError: Insufficient features blocks\n\n on <empty> line 0:\n (source code not available)\n\nAt least 1 \"features\" blocks are required.\n"}
This is because my provider is declared inside the common.tf file.
Would it be possible to add support for symbolic links ?