# README
go-lambda-template
Go lambda template using Gorilla Mux router.
includes basic unit test sample.
How To use
- create new repo using this as a template
- copy all files ./tf/template to ./tf/development (rename *.tmpl to *.tf)
- fill in details for backend and development and change the file name to backend.tf, development.tfvars, provider.tf Read ./tf/template/README.md for more information on templates.
- Check AWS cred (or use aws sso to login to your sso profile)
- Goto ./tf and run
terraform init
followed byterraform plan -no-color -var-file development.tfvars -out=out.tfplan
- Deploy can be started by
terraform apply "out.tfplan"
NOTES
- Github Actions can perform Terraform Deployment, make sure you setup IAM roles and trust github actions from AWS. See (https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services)
- IAM role trust relationship must refer to OIDC token providers and right Conditions, please see ./docs/sampleIAMRoleTrustedPolicy.json
- Do not FORK, use it as template or just clone and detach. If you fork, you will not be able to set the repo as private.