<#20275 `terraform_deployment` cannot load vars fi...
# github-notifications
c
#20275 `terraform_deployment` cannot load vars files if the root `terraform_module` is not in the same dir Issue created by lilatomic Describe the bug root/BUILD:
Copy code
terraform_deployment(root_module="//mod0:mod0", var_files=["a.tfvars"])
root/a.tfvars:
Copy code
var0 = "hihello"
mod/BUILD:
Copy code
terraform_module()
mod/main.tf:
Copy code
resource "null_resource" "dep" {}
running
pants experimental-deploy //root:root
yields:
Copy code
Engine traceback:
  in select
    ..
  in pants.core.goals.deploy.run_deploy
    `experimental-deploy` goal

Traceback (most recent call last):
  File "/home/lilatomic/vnd/pants/src/python/pants/core/goals/deploy.py", line 176, in run_deploy
    deploy_processes = await MultiGet(
  File "/home/lilatomic/vnd/pants/src/python/pants/engine/internals/selectors.py", line 374, in MultiGet
    return await _MultiGet(tuple(__arg0))
  File "/home/lilatomic/vnd/pants/src/python/pants/engine/internals/selectors.py", line 172, in __await__
    result = yield self.gets
ValueError: 'root/a.tfvars' is not in the subpath of 'mod0' OR one path is relative and the other is absolute.
Pants version 2.18+ pantsbuild/pants