-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Bug: sam build command doesn't support terraform's nested directory structure #4724
Comments
Hi, thanks for opening this issue. I can reproduce your issue where Terraform is not able to find the correct folder once it reaches our custom Makefile solution. This seems to be related to how we prepare the artifacts for SAM CLI since we copy the current directory to a scratch folder. In your case, this will end up missing the |
This is currently a limitation of our Terraform integration. Our artifact script expects all project assets and resources to be within the project folder. You can see some more discussion within our Terraform discussion thread: #4553 (comment) As a potential workaround for now, you can try moving your |
yeah this is kind of a big deal. Its very common to want to have multiple modules and different build targets in a single repo |
+1 for me |
Any updates? I am getting a similar error although with a slightly different error message. My error message is:
|
Any Updates? I agree with another thread and this thread, an existing production release would look more like the below for a standard python application.
I am surprised though, that if the original_source_code is declared in the metadata that this could not simply be pulled through as a provisional requirement during the sam build process. i guess it just a thought.
Another process could be adding it to the
I think all things possible, but it would be good to see a more supportive approach for structured repositories and multi environment deployments. The work around for exporting TF_ARGS can work for now, but it would be nice to declare a backend and default tf_file to. |
Hey,
You can run Please try the new feature, and let us know your feedback. |
closing this issue, as this feature got released in SAM CLI version 1.96.0. Please open new issues if you have any new requests. |
|
Description:
Relative paths provided in the source for modules throw errors when sam build command is run.
Steps to reproduce:
sam build --hook-name terraform --beta-features
Observed result:
Expected result:
Expected it to build functions without an issue because running terraform init in the root directory doesn't cause any issue.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
The text was updated successfully, but these errors were encountered: