Skip to content

aws terrafrom module to deploy a lambda which can start ec2s when devs need it and stop them at the end of the day

Notifications You must be signed in to change notification settings

Road-To-FinOps-Deploy/aws_tf_ec2_self_service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EC2 Self Service

Aws terrafrom module to deploy a lambda which can start ec2s when devs need it and stop them at the end of the day

Usage

module "aws_tf_ec2_self_service" { source = "/aws_tf_ec2_self_service" }

Optional Inputs

Name Description Type Default Required
ec2_stop_cron Rate expression for when to run the stop string "cron(0 20 ? * MON-FRI *)" no
function_prefix Prefix for the name of the lambda created string "" no
aws_region region deployed string "eu-west-1" no

Testing

Configure your AWS credentials using one of the supported methods for AWS CLI tools, such as setting the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables. If you're using the ~/.aws/config file for profiles then export AWS_SDK_LOAD_CONFIG as "True".

  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. cd test go mod init github.com/sg/sch go test -v -run TestTerraformAwsExample

About

aws terrafrom module to deploy a lambda which can start ec2s when devs need it and stop them at the end of the day

Resources

Stars

Watchers

Forks

Packages

No packages published