Table of Contents
🏗️ Accounting System IaC using Terraform
Technologies Used
Terraform as IaC and Azure as Cloud Provider.
Terraform
Terraform basically allows you to create cloud infrastructure through code definitions using their proprietary syntax and language. One of the main features is the Terraform Cli that allows you to easily verify, deploy and destroy all your cloud infra.
Accounting System
The proposed scenario is about a small accounting system that’s architecting and deploying cloud services to run their bussiness. Taking that into consideration I’ve come up with this diagram that illustrates the whole setup.
The setup consists of the following:
Networking
For networking I’ve come up with a network security group to secure all the subnets associated with the application and setup links and DNS for them to communicate accordingly.
Database & Document Storage
For database I’ve gone with a simple mssql instance. For unstructured data like documents, a queue storage for a function service to manage incoming data and store it on a blob storage instance.
WebApp
For both frontend and backend, I’ve set up a container-based solution using docker images to deploy both apps.
Monitoring
Finally for monitoring and app insights there’s an Azure App Insights instance for getting useful information on how to further improve the app.
Step to deploy
- Clone the repo
$ git clone https://github.com/gasc1211/accounting-system.git
- Setup your azure-cli and login
$ az login
- Setup terraform-cli
You can do so through here https://developer.hashicorp.com/terraform/install
- Setup project through the init command
$ terraform init
- Verify setup
$ terraform plan
- Deploy
$ terraform apply
What I’ve learned
Through this project I’ve learned more about how to scale an application for production and how easily a cloud solution can get really intricate and complex, hence the need for tools like Ansible and Terraform. Additionally, I’ve learned about how to setup a production app and deploy it on the cloud.