https://github.com/pcpratheesh/terraform-lambda-deployment-sample
Sample code for configure a lambda function with terraform
https://github.com/pcpratheesh/terraform-lambda-deployment-sample
aws code golang infrastructure lambda lambda-functions sample server serverless terraform
Last synced: 10 months ago
JSON representation
Sample code for configure a lambda function with terraform
- Host: GitHub
- URL: https://github.com/pcpratheesh/terraform-lambda-deployment-sample
- Owner: pcpratheesh
- Created: 2022-04-21T12:31:16.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-21T12:52:50.000Z (almost 4 years ago)
- Last Synced: 2025-01-29T00:36:45.289Z (12 months ago)
- Topics: aws, code, golang, infrastructure, lambda, lambda-functions, sample, server, serverless, terraform
- Language: HCL
- Homepage:
- Size: 4.45 MB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# terraform-lambda-deployment-sample
Sample code for configure a lambda function with terraform
## Terraform
- **init** Prepare your working directory for other commands
- **validate** Check whether the configuration is valid
- **plan** Show changes required by the current configuration
- **apply** Create or update infrastructure
- **destroy** Destroy previously-created infrastructure
This infra-structure will create a new lambda along with an api gateway connected.
Terraform will keep the state in an s3 bucket under a **state.tfstate** key. In order that to happen we need to set up three environment variables:
```sh
$ export AWS_SECRET_ACCESS_KEY=...
$ export AWS_ACCESS_KEY_ID=..
$ export AWS_DEFAULT_REGION=...
```
Also you can configure the data inside **variables.tf**