Discover Packages 
           
        
          
            gitlab.aldidevops.com/michels/terratest-fork 
           
        
          
            examples 
           
        
        
          
            terraform-aws-lambda-example
           
          
            
               
          
        
       
     
   
  
    
  
    
       
    
    
      directory 
    
    
      
        
           
      
    
   
    
      
  
    
      
  
    
      Version:  
        v0.0.0-...-5953fd8
     
    
      Opens a new window with list of versions in this module.
    
    
    
   
      
  
    Published: Mar  5, 2021
   
      
  
    License: Apache-2.0 
      
    
   
  
    Opens a new window with license information.
  
      
    
   
  
  
    
   
 
    
      
    
    
  
  
    
      
        
          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 testdep ensurego test -v -run TestTerraformAwsLambdaExample 
 
       
      Expand ▾ 
      Collapse ▴ 
    
   
      
      
      
      
        
  
    
      ¶ 
     
    
    
   
      
     
   
   Click to show internal directories. 
   Click to hide internal directories.