Greetings to my fellow Technology Advocates and Specialists.
In this Session, I will explain Terraform code repository structure: Monolith vs Microservice.
SPECIAL NOTE:- |
I thank @pwd9000 and @anandarbone for collaborating. Though I am publishing this Article, but both of them have the equal rights to republish and repost. |
CODE REPOSITORY:- |
Terraform Code Repository: Monolith or Microservice Approach:-
Greetings to my fellow Technology Advocates and Specialists.
In this Session, I will explain Terraform code repository structure: Monolith vs Microservice.
SPECIAL NOTE:- |
I thank @pwd9000 and @anandarbone for collaborating. Though I am publishing this Article, but both of them have the equal rights to republish and repost. |
CONSIDERATIONS:- |
For the purpose of this article, I/We have considered below:- |
# |
CATEGORY |
VALUE |
1. |
Cloud Platform |
Azure |
2. |
Devops Platform |
Azure Devops |
3. |
Source control |
Azure Git |
4. |
Pipelines |
Azure Devops Pipelines |
5. |
IaC |
Terraform |
6. |
Code Structure |
Modules Based |
What is Monolith based code repository in Terraform ? |
1. In simple terms, it means one repository under Azure DevOps Project with multiple folders. |
2. Each folder contains Terraform Module per Azure Service. |
3. Reference screenshot follows below:- |
![Image description](https://camo.githubusercontent.com/c63b919401a57f7b5a80f779e994c210c5ca4ac68101a2193a1135725d50510a/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f33653879647a677a6368717239346574696e77792e6a7067) |
Monolith based code repository problem statements:- |
1. Each time the Pipeline runs, it checks out all |
…
|
CONSIDERATIONS:- |
For the purpose of this article, I/We have considered below:- |
# |
CATEGORY |
VALUE |
1. |
Cloud Platform |
Azure |
2. |
Devops Platform |
Azure Devops |
3. |
Source control |
Azure Git |
4. |
Pipelines |
Azure Devops Pipelines |
5. |
IaC |
Terraform |
6. |
Code Structure |
Modules Based |
What is Monolith based code repository in Terraform ? |
1. In simple terms, it means one repository under Azure DevOps Project with multiple folders. |
2. Each folder contains Terraform Module per Azure Service. |
3. Reference screenshot follows below:- |
![Image description](https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3e8ydzgzchqr94etinwy.jpg) |
Monolith based code repository problem statements:- |
1. Each time the Pipeline runs, it checks out all codes. |
2. Pipeline execution time increases gradually. |
3. Size of the artifacts increases gradually . |
4. Avoid Human Error while contributing. |
What is Microservice based code repository in Terraform ? |
1. In simple terms, it means multiple repositories under Azure DevOps Project. |
2. Each repository contains Terraform Module per Azure Service. |
3. Reference screenshot follows below:- |
![Image description](https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb39p6ktnenjqlpvqffys.jpg) |
All the above identified problem statements in Monolith Code Repository is resolved with Microservice based code repository.
Mitigating Monolith based code repository problem statements with Microservice based code repository:- |
1. Each time the Pipeline runs, it checks out only the relevant repositories. |
2. Pipeline execution is fast/not impacted because it checks out only the relevant repositories. |
3. Size of the artifacts is way small and the increase is not even noticed because it checks out only the relevant repositories |
4. Chances of Human Error is on the lower side since contributor works on specific repositories. |
Hope You Enjoyed the Session!!!
Stay Safe | Keep Learning | Spread Knowledge
Top comments (0)