github.com/terraform-modules-krish/terratest@v0.29.0/examples/terraform-aws-lambda-example/README.md (about) 1 # Terraform Lambda Example 2 3 This folder contains a Terraform module to demonstrate how you can use Terratest to deploy a lambda function 4 for your Terraform code. This module takes in an input variable called `function_name`, and uses the function name as 5 an identifier for the lambda and associated resources (e.g. IAM role). 6 7 Check out [test/terraform_aws_lambda_example_test.go](https://github.com/terraform-modules-krish/terratest/blob/v0.29.0/test/terraform_aws_lambda_example_test.go) to see how you can write 8 automated tests for this simple module. 9 10 The function that this module creates is a simple one whose input can cause it to error or echo messages it receives. 11 12 ## Running this module manually 13 14 1. Install [Terraform](https://www.terraform.io/) and make sure it's on your `PATH`. 15 1. Run `terraform init`. 16 1. Run `terraform apply`. 17 1. When you're done, run `terraform destroy`. 18 19 ## Running automated tests against this module 20 21 1. Install [Terraform](https://www.terraform.io/) and make sure it's on your `PATH`. 22 1. Install [Golang](https://golang.org/) and make sure this code is checked out into your `GOPATH`. 23 1. `cd test` 24 1. `dep ensure` 25 1. `go test -v -run TestTerraformAwsLambdaExample`