https://github.com/dcc6fvo/terraform
Terraform scripts
https://github.com/dcc6fvo/terraform
aws cloud load-balancer nginx serverfarm terraform
Last synced: about 2 months ago
JSON representation
Terraform scripts
- Host: GitHub
- URL: https://github.com/dcc6fvo/terraform
- Owner: dcc6fvo
- Created: 2024-03-20T10:40:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-20T11:11:38.000Z (over 2 years ago)
- Last Synced: 2025-03-27T17:49:36.410Z (about 1 year ago)
- Topics: aws, cloud, load-balancer, nginx, serverfarm, terraform
- Language: HCL
- Homepage:
- Size: 61.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# terraform-app-load-balance
In this terraform/aws script we build a setup with an application load balancer. We will end up with following resources:
- one app load balancer that redirect traffic to two private subnets
- two management instances each in a different public subnet that can be used with Ansible and/or another config. tool
- two webserver instances each in a different private subnet that will respond to the load balancer requests
*NAT Gateways, Routers, Databases were abstract from the design but are necessary
Prerequisites
-----------------------
- Terraform
- AWS CLI
Installation && Running
-----------------------
1) Do a git clone of the project:
git clone https://github.com/dcc6fvo/terraform-app-load-balance
2) Change key info field of aws-instances with your current keys! Subs. the key_name parameter with your own from following files: ./main.tf; ./modules/main.tf; ./management.tf
3) Access the newly created folder with the git clone command and type the following command:
terraform init
4) Then creates an execution plan, which lets you preview the changes that Terraform plans to make to your infrastructure:
terraform plan
5) Finally, the command that executes the actions proposed in a terraform plan (it is used to deploy your infrastructure):
terraform apply -auto-approve
To destroy all the configurations:
terraform destroy
# terraform-basic-setup
In this very basic terraform/aws script we manage to work with 2 AWS regions. After running, the program will create:
- one public instance in sa region
- one public instance in us region
- four private instances in sa region
Prerequisites
-----------------------
- Terraform
- AWS CLI
Installation && Running
-----------------------
Do a git clone of the project:
git clone https://github.com/dcc6fvo/terraform-basic-setup
Change key-pair field of aws-instances with your current keys:
vim main.tf
Access the newly created folder with the git clone command and type the following command:
terraform init
Then creates an execution plan, which lets you preview the changes that Terraform plans to make to your infrastructure:
terraform plan
Finally, the command that executes the actions proposed in a terraform plan (it is used to deploy your infrastructure):
terraform apply -auto-approve
To destroy all the configurations:
terraform destroy
# terraform-multi-env
# terraform-super-basic