{"id":16533004,"url":"https://github.com/jeff-pedro/learn-terraform-ansible","last_synced_at":"2026-05-06T04:03:55.896Z","repository":{"id":171135323,"uuid":"647062441","full_name":"jeff-pedro/learn-terraform-ansible","owner":"jeff-pedro","description":"Repository used to learn about Ansible and Terraform with AWS provider.","archived":false,"fork":false,"pushed_at":"2024-02-01T17:39:37.000Z","size":68,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-03T18:30:37.104Z","etag":null,"topics":["ansible","aws","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeff-pedro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-30T01:34:38.000Z","updated_at":"2023-06-02T18:18:26.000Z","dependencies_parsed_at":"2025-03-03T12:41:55.164Z","dependency_job_id":null,"html_url":"https://github.com/jeff-pedro/learn-terraform-ansible","commit_stats":null,"previous_names":["jeff-pedro/learn-terraform-aws-instance"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jeff-pedro/learn-terraform-ansible","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeff-pedro%2Flearn-terraform-ansible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeff-pedro%2Flearn-terraform-ansible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeff-pedro%2Flearn-terraform-ansible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeff-pedro%2Flearn-terraform-ansible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeff-pedro","download_url":"https://codeload.github.com/jeff-pedro/learn-terraform-ansible/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeff-pedro%2Flearn-terraform-ansible/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32677933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T02:33:58.958Z","status":"ssl_error","status_checked_at":"2026-05-06T02:33:39.611Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ansible","aws","terraform"],"created_at":"2024-10-11T18:13:54.790Z","updated_at":"2026-05-06T04:03:55.872Z","avatar_url":"https://github.com/jeff-pedro.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Learning Terraform and Ansible with AWS provider\n\n\u003e This repository deploy a simple API. Building the infrastructure, installation and dependencies necessary to run the web server.\n\n### Applied Concepts\n\n- Separation of environments: Production and Dev\n- Elastic Infrastructure\n- Suspend Machines\n- Load Test with [Locust](https://locust.io/)\n\n### Useful resources\n\n- [Official Terraform Docs](https://developer.hashicorp.com/terraform/tutorials/aws-get-started)\n- [Official Ansible Docs](https://docs.ansible.com/ansible/latest/getting_started/index.html)\n\n## Terraform\n\n\u003e Used to deploy the infrastructure.\n\n### Initialize the configuration directory\n\n```\nterraform init\n```\n\n### Check and validate format code\n\n```\nterraform fmt\nterraform validate\n```\n\n### Create infrastructure\n\n1. Show the plan\n\n   ```\n   terraform plan\n   ```\n\n2. Apply changes\n\n   ```\n   terraform apply\n   ```\n\n3. Destroy resources\n   ```\n   terraform destroy\n   ```\n\n## Ansible\n\n\u003e Used to manage configurations and install programs.\n\n1. Run\n   ```\n   ansible-playbook playbook.yml -u [user] --private-key [key] --hosts [host_file]\n   ```\n\n## Deploy Production\n\n---\n\n1. Go to\n   ```\n   cd ./env/Prod\n   ```\n2. Check\n   ```\n   terraform plan\n   ```\n3. Deploy\n   ```\n   terraform apply\n   ```\n\n**Web Interface**\n\n\u003e http://\u003cserver_ip | loadbalancer_dns\u003e:**8000**\n\n## Deploy Dev\n\n---\n\n1. Go to\n   ```\n   cd ./env/Dev\n   ```\n2. Check\n   ```\n   terraform plan\n   ```\n3. Deploy Infrastruture\n   ```\n   terraform apply\n   ```\n4. Deploy API\n   ```\n   ansible-playbook playbook.yml -u ubuntu --private-key IaC-DEV  --hosts ../../infra/hosts.yml\n   ```\n\n**Web Interface**\n\n\u003e http://\u003cserver_ip\u003e:**8000**\n\n## Load Test\n\n```\nlocust -f ./load.py\n```\n\n**Web Interface**\n\n\u003e http://0.0.0.0:8089","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeff-pedro%2Flearn-terraform-ansible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeff-pedro%2Flearn-terraform-ansible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeff-pedro%2Flearn-terraform-ansible/lists"}