简体   繁体   中英

How can I define lambda function test events using Terraform?

I've provisioned a lambda function successfully using Terraform. However, I noticed that there's no attributes under aws_lambda_function that allows me to define test events; Just to be clear, the "tests" I am referring to are JSON that I can define by clicking the "test" button in AWS Lambda console to simulate an event.

Is it possible to define tests events using Terraform scripts? If it is not possible, what other options do I have other than manually adding them via AWS Lambda console?

This looks to be the closest thing I could find on Terraform documentation: Lambda invocation .

When the question was posted, I did not know the correct term to search for. The correct term is "lambda events".

A quick search shows a similar question has been raised 3 years ago .

The short answer is this is not possible at this time as there is no AWS API that supports this functionality which is what the Terraform AWS Provider is limited by.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM