-
Notifications
You must be signed in to change notification settings - Fork 9.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
Feature request: Data Source for Lambda function #2578
Comments
Hi @et304383! Thanks for this feature request. We are generally in favor of adding new data sources where it makes it possible to fetch additional attributes for an object that wouldn't otherwise naturally be available, as in this case. The Terraform team at HashiCorp won't be able to work on this in the near future due to our focus being elsewhere, but we'd be happy to review a pull request if you or someone else has the time and motivation to implement it. Alternatively, if others would also like to see this implemented I'd encourage adding a 👍 upvote reaction to the original issue comment (not to this comment), which we use as one of the inputs to prioritize work for the Terraform team. |
@loivis I explicitly said the Lambda fucntion is created outside of Terraform via Serverless. |
As a workaround in the meantime, the ARN of a Lambda function is deterministic:
You can therefore do something like this:
Then reference your lambda function as:
|
@jammycakes-ukpds kudos, but region goes before account. This is the correct syntax:
|
Has this been addressed in #2984 ? |
This has been released in version 1.16.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
The use case is simple: we create Lambda functions via serverless and want to reference that Lambda function in a terraform file when creating a Cognito user pool for custom verification flow.
There appears to be no easy way to get the Lambda function ARN in our terraform file.
The text was updated successfully, but these errors were encountered: