Infrastructure as Code for both Amazon Web Services and Microsoft Azure written in Terraform.
Install Terraform on your local machine using:
./terraform_install/install_terraform.shAccording to best practices, the terraform structure is as follows:
├── environments
│ ├── dev
│ │ ├── main.tf
│ │ ├── terraform-dev.tfvars
│ │ └── variables.tf
│ ├── prod
│ │ ├── main.tf
│ │ ├── terraform-prod.tfvars
│ │ └── variables.tf
│ └── readme.md
├── modules
│ └── {LIST_OF_ALL_MODULES}
└── Readme.md
There are two environments, i.e. dev and prod.
To deploy to specific environment, initialize terraform in respective folder
All the modules are stored in the modules folder, with a seperate folder for every module.
All all new and existing modules in this folder.
terraform initterraform plan -var-file=<varfile_name>.tfvars -out=<Output_Plan_File_Name.tfstate>terraform apply "<Output_Plan_File_Name.tfstate>"terraform destroy -var-file=<varfile_name>.tfvars| AWS | AZURE |
|---|---|
| Virtual Private Cloud (VPC) | Virtual Network |
| Organizations | Subscription Management + RBAC + Policy + Management Groups |
| CloudWatch | Monitor |
| CloudFront | Content Delivery Network |
| Route 53 | DNS |
| Codedeploy | DevOps |
| EC2 | Virtual Machines |
| Application Load Balancer | Application Gateway |
| Auto Scaling | Virtual Machine Scale Sets |
| S3 | Blob storage |
| Server-side encryption with Amazon S3 Key Management Service | Azure Storage Service Encryption |
| RDS | Database for MySQL |
| DynamoDB | Cosmos DB |
| Lambda | Functions |
| Certificate Manager | App Service Certificates |
| Web Application Firewall | Application Gateway - Web Application Firewall + Azure Firewall |
| SNS | Event Grid |
| SES |