terraform-aws-lambda-example/

directory
v0.28.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2023 License: Apache-2.0

README

Terraform Lambda Example

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

  1. Install Terraform and make sure it's on your PATH.
  2. Run terraform init.
  3. Run terraform apply.
  4. When you're done, run terraform destroy.

Running automated tests against this module

  1. Install Terraform and make sure it's on your PATH.
  2. Install Golang and make sure this code is checked out into your GOPATH.
  3. cd test
  4. dep ensure
  5. go test -v -run TestTerraformAwsLambdaExample

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL