flavien 1f177ddf9a | ||
---|---|---|
doc | ||
services | ||
terraform | ||
.gitignore | ||
.python-version | ||
LICENSE | ||
README.md | ||
Taskfile.yml |
README.md
terraform_api_gateway
API Gateway with terraform for learning!
deployment tasks
task terraform_plan ENV=...
=> plan the terraform deployment + create a tfplan.json
that resume the modifications.
task terraform_apply ENV=...
=> deploy the stack.
task terraform_destroy ENV=...
=> destroy the stack.
ℹ️ configured environments:
- dev
test commmands
login to cognito from cli to get IdToken
Run:
aws cognito-idp initiate-auth --region <...> --auth-flow USER_PASSWORD_AUTH --client-id <...> --auth-parameters USERNAME=<...>,PASSWORD=<...>
Then copy the "IdToken"
from response.
test an api endpoint with cognito authorizer
curl --header "Authorization: <IdToken>" https://<...>.execute-api.eu-west-1.amazonaws.com/<stage>/<route>
TODO
- create a post route
- body validation
- reponse transformation
- routes module
- swagger documentation
- use aws lambda module
critique du code
Il n'y as pas vraiment de plus value d'avoir une conf de backend par env avec les workspaces.