forked fromUlisesGascon/sample-terraform-localstack
- Notifications
You must be signed in to change notification settings - Fork0
Sample project to use Terraform, Localstack (AWS Local) and Docker compose with Nodejs
License
NotificationsYou must be signed in to change notification settings
nahteb/sample-terraform-localstack
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Sample project to use Terraform, Localstack (AWS Local) and Docker compose with Nodejs.
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'
Previous Steps...
- You need to installDocker and Docker Compose to play this game 😉
- You need to simulate AWS in local?.
- I usedLocalstack as part of the docker compose dependencies. Let's keep it simple and clean 💪
- Just run
docker-compose up
- Check
http://localhost:4566/health
Time to play
- You need to run/testTerraform scripts?
- You need toinstall Terraform in your machine (for mac:
brew install terraform
) - Check the example file
main.tf
- Initialize the environment
terraform init
- Execute it
terraform apply
- You need toinstall Terraform in your machine (for mac:
- You need to run AWS Cli commands?
- You need to installAWS CLI (for mac:
brew install awscli
) - Example of bucket creation
- Update you config
aws config
check.env
- Create Bucket
aws --endpoint-url=http://localhost:4566 s3 mb s3://demo-bucket
- Attach anACL to the bucket so it is readable
aws --endpoint-url=http://localhost:4566 s3api put-bucket-acl --bucket demo-bucket --acl public-read
- Update you config
- Run
aws --endpoint-url=http://localhost:4566 s3 ls
- You need to installAWS CLI (for mac:
- You need to run SDK Scripts?
- Install Node
- Check
aws.js
andupload-demo.js
- Install dependencies
npm install
- Run the script
node upload-demo
- Check
./localstack/data
files
About
Sample project to use Terraform, Localstack (AWS Local) and Docker compose with Nodejs
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Languages
- JavaScript78.5%
- HCL21.5%