-
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
execute aws_lambda_invocation only once #4746
Comments
One further idea on that: |
Is this becoming kinda issue for us. Is there a way to not run data during apply ? |
Can I work on this? I think first option should be the solution. |
Temporarily, I created this community provider. https://registry.terraform.io/providers/dedunumax/awslambda/latest But you might need Terraform 0.13 to try that. |
As a workaround, I did the following:
|
Any news about this issue ? |
I have made a PR to fix this. But it is not merged yet. |
Any update on if the PR is merged? |
Bump. Can this get merged? |
Please upvote the new PR, thanks. |
Please merge this as it is a so important BC Break between 0.12 and 0.13 without any workaround besides this new resource. |
So in the lambda you actually check the event is not empty? |
Hi all 👋 Just letting you know that this is issue is featured on this quarters roadmap. If a PR exists to close the issue a maintainer will review and either make changes directly, or work with the original author to get the contribution merged. If you have written a PR to resolve the issue please ensure the "Allow edits from maintainers" box is checked. Thanks for your patience and we are looking forward to getting this merged soon! |
When does the quarter finish? |
any heads up on this one? |
Thank you for your patience. This functionality has been merged and should be part of the next version. |
This functionality has been released in v3.73.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
Community Note
Description
After creating an aws_lambda_function I want directly to trigger it for a first initialization. Currently I'm doing this using a provisioner and and some shell commands, which are invoking the the lambda with the AWS CLI.
I've seen there is now an aws_lambda_invocation data source, which does exactly the same like my provisioner. In my case, the disadvantage of a data source is, that the lambda is executed every time I do
a "terraform plan" or "terraform apply", which is not needed and increases the execution time (and AWS costs).
It would be nice to be able to trigger a lambda function only once
New or Affected Resource(s)
Option 1
Create:
Option 2
Update:
Potential Terraform Configuration
I would prefer the first option, to create a new ressource type. It would look like the data source:
As an alternative an optional attribute in the data source can manage the behavior:
References
No references
The text was updated successfully, but these errors were encountered: