Discover Packages
github.com/terraform-modules-krish/terratest
examples
terraform-aws-lambda-example
directory
Version:
v0.28.8
Opens a new window with list of versions in this module.
Published: Oct 25, 2023
License: Apache-2.0
Opens a new window with license information.
README
README
¶
This folder contains a Terraform module to demonstrate how you can use Terratest to deploy a lambda function
for your Terraform code. This module takes in an input variable called function_name
, and uses the function name as
an identifier for the lambda and associated resources (e.g. IAM role).
Check out test/terraform_aws_lambda_example_test.go to see how you can write
automated tests for this simple module.
The function that this module creates is a simple one whose input can cause it to error or echo messages it receives.
Running this module manually
Install Terraform and make sure it's on your PATH
.
Run terraform init
.
Run terraform apply
.
When you're done, run terraform destroy
.
Running automated tests against this module
Install Terraform and make sure it's on your PATH
.
Install Golang and make sure this code is checked out into your GOPATH
.
cd test
dep ensure
go test -v -run TestTerraformAwsLambdaExample
Expand ▾
Collapse ▴
Directories
¶
Click to show internal directories.
Click to hide internal directories.