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

No such file or directory "package.py" with -chdir option #135

Closed
alexedwardjones opened this issue Mar 29, 2021 · 2 comments
Closed

No such file or directory "package.py" with -chdir option #135

alexedwardjones opened this issue Mar 29, 2021 · 2 comments

Comments

@alexedwardjones
Copy link
Contributor

alexedwardjones commented Mar 29, 2021

Summary

I'm using terraform with the chdir option to change the working directory to a subdirectory called tf.

package.json
src/
tf/
   .terraform
   main.tf
   lambda.tf

So all of my commands look like this:

  • terraform -chdir=tf init
  • terraform -chdir=tf apply

I'm getting an error that looks like the following...

3.9.1/bin/python3: can't open file ... /.terraform/modules/lambda_function/package.py': [Errno 2] No such file or directory

I believe that this might be caused by this line and the "${path.module}/package.py" no longer referencing the correct path.

program = [local.python, "${path.module}/package.py", "prepare"]

I tried removing the line below and then it seems to work with and without the chdir option.

working_dir = path.cwd

@antonbabenko
Copy link
Member

Fixed in #136

v1.46.0 has been just released.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants