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

tfci does not handle working directory with more than 1 level #108

Open
Pierre-Raffa opened this issue Jun 2, 2024 · 0 comments
Open

tfci does not handle working directory with more than 1 level #108

Pierre-Raffa opened this issue Jun 2, 2024 · 0 comments

Comments

@Pierre-Raffa
Copy link

Pierre-Raffa commented Jun 2, 2024

Hello,
I am currently facing an issue with tfci running in github actions.
I setup my Terraform cloud workspace directory to be layer0/infrastructure/eks
But tfci 1.3.0 command:

tfci -hostname= -token= -organization= run create -workspace=myworkspace -configuration_version=cv-xxxxxx -message= -plan-o
nly=true

returns

lstat /home/tfc-agent/.tfc-agent/component/terraform/runs/run-o2Mn1KYJt4F6TbGD/config/layer0

Only the root level of the working directory has been used.
If I trigger a run manually in Terraform cloud UI, no issue.

Full log:

tfci -hostname= -token= -organization= run create -workspace=pierre-eks-us-east-2 -configuration_version=cv-xxxx -message= -plan-o
nly=true
Created Run ID: "run-o2Mn1KYJt4F6TbGD"
Run Status: "plan_queued"
Run Status: "plan_queued"
Run Status: "errored"
-------------- Plan Log --------------
Terraform v1.7.5
on linux_amd64

Error: No Terraform configuration files found in working directory

Terraform requires configuration files to plan changes. Planning without a
configuration would mark everything for destruction, which is normally not what
is desired. If you would like to destroy everything, queue a destroy plan
instead. Otherwise, create a Terraform configuration file (.tf file), or check
that the working directory is set correctly on the workspace, and try again.
Operation failed: failed checking for terraform files: lstat /home/tfc-agent/.tfc-agent/component/terraform/runs/run-o2Mn1KYJt4F6TbGD/config/layer0: no such file or directory

Any idea?
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant