diff --git a/README.md b/README.md index 983dcba9..e7e3df29 100644 --- a/README.md +++ b/README.md @@ -351,7 +351,7 @@ terraform apply ## Build Dependencies -You can specify `source_path` in a variety of ways to achieve desired flexibility when building deployment packages locally or in Docker. You can use absolute or relative paths. +You can specify `source_path` in a variety of ways to achieve desired flexibility when building deployment packages locally or in Docker. You can use absolute or relative paths. If you have placed terraform files in subdirectories, note that relative paths are specified from the directory where `terraform plan` is run and not the location of your terraform file. Note that, when building locally, files are not copying anywhere from the source directories when making packages, we use fast Python regular expressions to find matching files and directories, which makes packaging very fast and easy to understand. diff --git a/package.py b/package.py index b99ca2cb..4d22ff38 100644 --- a/package.py +++ b/package.py @@ -698,7 +698,7 @@ def commands_step(path, commands): if isinstance(claim, str): path = claim if not os.path.exists(path): - abort('source_path must be set.') + abort('Could not locate source_path "{path}". Paths are relative to directory where `terraform plan` is being run.'.format(path=path)) runtime = query.runtime if runtime.startswith('python'): pip_requirements_step(