Skip to content

nogsantos/poc-aws-lambda-terraform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

POC - AWS Lambda Terraform provider

Deploy lambda functions using Terraform.

Setup

Regions are defined by current workspace, and by default, they are configured on variables file.

Has been created a simple Python function for this example.

Profile

Define the profile access on ~/.aws/credentials, ex.:

[lambidas]
aws_access_key_id = <KEY>
aws_secret_access_key = <ACCESS-KEY>

Init

Initialize the working directory. Install project dependencies.

$ terraform init

Workspace

Workspaces enable apply same configurations in differents cenarios like production, homologation, development.

View a list of availables workspaces

$ terrafor workspace list 

Create a new workspace

$ terraform workspace new <workspace-name>

Use terraform.workspace on code to get current workspace

Workflow

Validate

Validates the Terraform files before

$ terraform validate

Plan

Generate and show an execution plan

$ terraform plan

Apply

Builds or changes infrastructure. Persist current state changes to local and remote storage

$ terraform apply -auto-approve

Destroy

Destroy created managed infrastructure

$ terraform destroy -auto-approve

About

Poc - Publish AWS Lambdas using Terraform

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published