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

source_path must be relative to where terraform is run #89

Closed
ers81239 opened this issue Dec 22, 2020 · 3 comments
Closed

source_path must be relative to where terraform is run #89

ers81239 opened this issue Dec 22, 2020 · 3 comments

Comments

@ers81239
Copy link
Contributor

ers81239 commented Dec 22, 2020

I created this PR to better document and report errors based on how source_path is interpreted currently.

However, now I see that the current behavior is more of a problem than before. I've created an ./examples/example1 dir for my module which has a main.tf that calls my custom module with a source of ../../. When I run terraform plan from within this examples directory, the source_path specified in the source is being interpreted relative to this example1 directory instead of from the module's root directory.

This causes a source_path must be set error.

Recommended Fix:

Interpret source_paths relative to the location of the terraform file in which they are named.

@ers81239
Copy link
Contributor Author

I was able to work around this by specifying source_path with "${path.module}/lambda_source_dir". I still think my PR should be accepted.

@antonbabenko
Copy link
Member

I have just merged your PR where documentation was updated.

Happy New Year!

@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