How to setup Localstack for Terraform Infrastructure Code
HTML-код
- Опубликовано: 21 авг 2024
- This episode shows how to setup Localstack and spinning up infrastructure code using Terraform.
This video involves setting up Localstack using docker compose and spinning up the infrastructure written using terraform into this Localstack.
References:
Localstack github repository: github.com/loc...
This episode will make use of Infrastructure Code that has been written from the previous episode on IAM Access keys found her ( • Generating IAM Access ... ) and so it is recommended (but not required) to watch this video first.
Github Code Link: github.com/dyo...
#AWS #Localstack #Terraform #MockingAWS #LambdaFunction #TerraformInDocker
this is going to be pretty useful i will try it out, thanks!
Compact, informative and nothing extraneous... just how I like tech videos!!
Thank you for sharing this!
My pleasure! :)
This solves a problem for me
Hello, thank you for the tutorial! I am wondering if there is a way how to do this easier - etc. having an extra layer - config file with TEST and PROD environment that would be used as a source. Therefore if it is possible to have standard terraform file where just environment would be switched, delivering either localstack or aws configuration and no other changes would be necessary for the files and the lambda function code.
This is quite laborious and requires a lot of changes which breaks the rule of having an environment for testing as close to the production.
Did you encounter any good practice for such use between aws and locastack?
Hi @Jaja. Thank you for bringing up this question. This one is a very good question. I use this tool: github.com/wbingli/awscli-plugin-endpoint. There are a few items to tweak on the aws profile but i find this very very handy to switch from localstack to actual AWS endpoint.
@@pablosspot Thank you very much I will check it out :)
Hi Pablo, Can you please share your github repo for the code in this video
Hi Naptime Soon,
Apologies for the delay.
The code for this video is here: github.com/dyords/pablosspot/tree/main/ep-11
Thanks mate
localstack is a great idea but the poor docs and no UI makes it a bit of a pain.
That's true. I use it a lot for local integration before pushing to the real one. But then again, not all services are OS.