{"id":15645339,"url":"https://github.com/ulisesgascon/sample-terraform-localstack","last_synced_at":"2025-04-30T11:34:19.786Z","repository":{"id":48481479,"uuid":"197200968","full_name":"UlisesGascon/sample-terraform-localstack","owner":"UlisesGascon","description":"Sample project to use Terraform, Localstack (AWS Local) and Docker compose with Nodejs","archived":false,"fork":false,"pushed_at":"2021-11-16T21:54:53.000Z","size":158,"stargazers_count":58,"open_issues_count":1,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-26T23:32:12.755Z","etag":null,"topics":["aws","docker","docker-compose","localstack","nodejs","terraform"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UlisesGascon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-16T13:36:55.000Z","updated_at":"2024-11-23T10:44:07.000Z","dependencies_parsed_at":"2022-08-24T14:39:16.214Z","dependency_job_id":null,"html_url":"https://github.com/UlisesGascon/sample-terraform-localstack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UlisesGascon%2Fsample-terraform-localstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UlisesGascon%2Fsample-terraform-localstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UlisesGascon%2Fsample-terraform-localstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UlisesGascon%2Fsample-terraform-localstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UlisesGascon","download_url":"https://codeload.github.com/UlisesGascon/sample-terraform-localstack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251691852,"owners_count":21628403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","docker","docker-compose","localstack","nodejs","terraform"],"created_at":"2024-10-03T12:06:35.129Z","updated_at":"2025-04-30T11:34:19.765Z","avatar_url":"https://github.com/UlisesGascon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sample terraform localstack\n\nSample project to use Terraform, Localstack (AWS Local) and Docker compose with Nodejs.\n\n\n### Important\n\nAs this is a simple example I will use only this references. Please change it :wink:\n\n```\nAWS_ACCESS_KEY_ID='123'\nAWS_SECRET_KEY='xyz'\nAWS_BUCKET_NAME='demo-bucket'\nAWS_BUCKET_REGION='us-east-1'\n```\n\n### What is this about?\n\n**Previous Steps...**\n- You need to install [Docker and Docker Compose](https://docs.docker.com/install/) to play this game :wink:\n- You need to simulate AWS in local?. \n    - I used [Localstack](https://localstack.cloud/) as part of the docker compose dependencies. Let's keep it simple and clean :muscle:\n    - Just run `docker-compose up`\n    - Check `http://localhost:8055/#/infra`\n\n\n**Time to play**\n- You need to run/test [Terraform scripts](https://www.terraform.io/)? \n    - You need to [install Terraform in your machine](https://learn.hashicorp.com/terraform/azure/install_az) (for mac: `brew install terraform`)\n    - Check the example file `main.tf`\n    - Initialize the enviroment `terraform init`\n    - Execute it `terraform apply`\n    - Check `http://localhost:4572/` and `http://localhost:8055/#/infra`\n- You need to run AWS Cli commands?\n    - You need to install [AWS CLI](https://docs.aws.amazon.com/es_es/cli/latest/userguide/cli-chap-install.html) (for mac: `brew install awscli`)\n    - Example of bucket creation\n        - Update you config `aws config` check `.env`\n        - Create Bucket `aws --endpoint-url=http://localhost:4572 s3 mb s3://demo-bucket`\n        - Attach an [ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html) to the bucket so it is readable `aws --endpoint-url=http://localhost:4572 s3api put-bucket-acl --bucket demo-bucket --acl public-read`\n    - Check `http://localhost:4572/` and `http://localhost:8055/#/infra`\n- You need to run SDK Scripts?\n    - [Install Node](https://nodejs.org/en/download/)\n    - Check `aws.js` and `upload-demo.js`\n    - Install dependencies `npm install`\n    - Run the script `node upload-demo`\n    - Check `./localstack/data` files\n\n\n### Context (Please Read)\n- [How to fake AWS locally with LocalStack by Joseph Thomas (@good-idea)](https://dev.to/goodidea/how-to-fake-aws-locally-with-localstack-27me)\n- [System testing: Localstack + Terraform by Rodion Chachura (@RodionChachura)](https://medium.com/@geekrodion/system-testing-localstack-terraforms-37b31ba99310)\n- [Gist | Terraform + Localstack by Diego Pacheco(@diegopacheco)](https://gist.github.com/diegopacheco/6c2fe827444d4f3a350ba1f477a7d1e4)\n- [Extra: Git Crypt Cheatsheet by @skylander](https://gitlab.com/snippets/1711341)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulisesgascon%2Fsample-terraform-localstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fulisesgascon%2Fsample-terraform-localstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulisesgascon%2Fsample-terraform-localstack/lists"}