All Projects → UlisesGascon → sample-terraform-localstack

UlisesGascon / sample-terraform-localstack

Licence: GPL-3.0 license
Sample project to use Terraform, Localstack (AWS Local) and Docker compose with Nodejs

Programming Languages

javascript
184084 projects - #8 most used programming language
HCL
1544 projects

Projects that are alternatives of or similar to sample-terraform-localstack

go-localstack
Go Wrapper for using localstack
Stars: ✭ 56 (+7.69%)
Mutual labels:  localstack
docs
The LocalStack documentation 📖
Stars: ✭ 24 (-53.85%)
Mutual labels:  localstack
testing-spring-boot-applications-masterclass
🍃 Everything You Need to Know About Testing Spring Boot Applications
Stars: ✭ 185 (+255.77%)
Mutual labels:  localstack
localstack-spring-boot-starter
SpringBoot Starter for Localstack
Stars: ✭ 38 (-26.92%)
Mutual labels:  localstack
Localstack
💻 A fully functional local AWS cloud stack. Develop and test your cloud & Serverless apps offline!
Stars: ✭ 37,724 (+72446.15%)
Mutual labels:  localstack
dockerX
Examples of amazing Docker/Docker-Compose/Docker Swarm technologies
Stars: ✭ 17 (-67.31%)
Mutual labels:  localstack
spring-localstack
An easy way to use Localstack with Spring
Stars: ✭ 48 (-7.69%)
Mutual labels:  localstack
nodejs-hexagonal-boilerplate
Boilerplate de arquitetura hexagonal usando node.js
Stars: ✭ 127 (+144.23%)
Mutual labels:  localstack

Sample terraform localstack

Sample project to use Terraform, Localstack (AWS Local) and Docker compose with Nodejs.

Important

As this is a simple example I will use only this references. Please change it 😉

AWS_ACCESS_KEY_ID='123'
AWS_SECRET_KEY='xyz'
AWS_BUCKET_NAME='demo-bucket'
AWS_BUCKET_REGION='us-east-1'

What is this about?

Previous Steps...

  • You need to install Docker and Docker Compose to play this game 😉
  • You need to simulate AWS in local?.
    • I used Localstack as part of the docker compose dependencies. Let's keep it simple and clean 💪
    • Just run docker-compose up
    • Check http://localhost:8055/#/infra

Time to play

  • You need to run/test Terraform scripts?
    • You need to install Terraform in your machine (for mac: brew install terraform)
    • Check the example file main.tf
    • Initialize the enviroment terraform init
    • Execute it terraform apply
    • Check http://localhost:4572/ and http://localhost:8055/#/infra
  • You need to run AWS Cli commands?
    • You need to install AWS CLI (for mac: brew install awscli)
    • Example of bucket creation
      • Update you config aws config check .env
      • Create Bucket aws --endpoint-url=http://localhost:4572 s3 mb s3://demo-bucket
      • Attach an ACL to the bucket so it is readable aws --endpoint-url=http://localhost:4572 s3api put-bucket-acl --bucket demo-bucket --acl public-read
    • Check http://localhost:4572/ and http://localhost:8055/#/infra
  • You need to run SDK Scripts?
    • Install Node
    • Check aws.js and upload-demo.js
    • Install dependencies npm install
    • Run the script node upload-demo
    • Check ./localstack/data files

Context (Please Read)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].