-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Can't use ForEach intrinsic function to define resources #3641
Comments
Hi there, thanks for opening this issue and for contributing to SAM. Seems like a valid request to me, I'll try to look through your PR early next week |
We shouldn't be adding support for Context: Instrinsics have caused multiple issues over the year for us and why we now recommend customers to use The issue here is not that SAM doesn't support |
Agree with Jacob on this, didn't realize that SAM CLI doesn't support Language Extensions and thats what was causing the issue. Closing this issue for now, thanks again for bringing this up. Feel free to re-open if you want to discuss further. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
hi @jfuss , as a customer, we would expect it to be working and integrate it well with the feature AWS provide. In addition, if this is right "Instrinsics have caused multiple issues over the year for us", why hasn't it been resolved or in the backlog to resolve. when I was notified that cloud formation support for loop feature, I was super happy and write article to celebrate it. but I was disappointed that one of my favourite tool - sam does not work well with it. if this is not going into the right direction, how would we recommend sam over terraform to others/clients |
Hi @brianhhq aws/aws-sam-cli#5647 this feature request to support Language Extensions in SAM CLI would be the right request to use as the issue is with the |
Description
The SAM CLI fails to parse templates using the
ForEach
intrinsic function to define resources. The build first fails inaws-sam-translator
code.Comments in a similar issue reported in the
sam-cli
project (aws/aws-sam-cli#5647) point to a fix recently merged in AWS CLI (aws/aws-cli#8096). Applying similar changes in bothaws-sam-translator
(see #3636) andaws-sam-cli
on a local test environment fixes the issue.Steps to reproduce
Run
sam build
with the example provided in the function reference documentationObserved result
The command fails in
aws-sam-translator
code with the following traceback:Expected result
The command shouldn't fail and output:
Additional environment details
sam --version
: reproduced with bothSAM CLI, version 1.121.0
andSAM CLI, version 1.123.0
The text was updated successfully, but these errors were encountered: