https://github.com/jd-apprentice/base-web-server
Base template for a EC2 server with terraform + ansible
https://github.com/jd-apprentice/base-web-server
Last synced: 4 months ago
JSON representation
Base template for a EC2 server with terraform + ansible
- Host: GitHub
- URL: https://github.com/jd-apprentice/base-web-server
- Owner: jd-apprentice
- License: mit
- Created: 2023-08-19T21:35:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-22T05:17:34.000Z (over 2 years ago)
- Last Synced: 2025-03-28T11:34:49.767Z (11 months ago)
- Language: HCL
- Homepage: https://blog.jonathan.com.ar/unleashing-automation-spinning-up-ec2-instances-with-the-dynamic-duo-of-terraform-and-ansible
- Size: 38.1 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Template to run AWS EC2 + Docker 🐋

### Requirements 🙂
- Terraform
- Ansible
- AWS Free Tier Account
- Unix based OS
### Steps 📫
1. Create your ssh-key
2. Optain your variables from AWS
3. Populate the variables in `secret.tfvars` file
4. Populate the `PRIVATE_KEY_PATH` in the `Makefile`
5. Verify things like `ami`, `instance_type`, `region` in `variables.tf`
6. Run `make init`
7. Run `make`
### Troubleshooting 🧰
In case the ansible part fail run `make connect` to connect to the instance manually. After the connection is done exit and run `make playbook` to run the ansible playbook again.