Enhancing the Run/Build Ratio: Unleash the power of code and developer autonomy

Enhancing the Run/Build Ratio: Unleash the power of code and developer autonomy

Introduction

Nowadays, modern cloud-focused companies face the crucial challenge of optimizing the run-to-build ratio. However, developers' dependency on DevOps teams, repetitive tasks, and lack of autonomy can lead to delivery delays, hinder productivity, and increase the run aspect while decreasing the build aspect. 🏃🔧

In this article, we will present an innovative solution that empowers developers to manage and optimize their infrastructures using JSON files. This approach aims to reduce support time, eliminate repetitive tasks, and enhance the quality of Terraform code, thereby contributing to achieving a better run/build ratio. 🚀💻

To better understand how this groundbreaking approach can transform the infrastructure creation and management process, let's explore the different stages: the challenge of DevOps teams, the JSON-based approach, the advantages it offers, and a concrete practical case to illustrate its application.💡

The challenge of DevOps Teams ⚙️💪

Traditionally, the creation of resources such as GCP buckets, datasets (Google Cloud Platform) often requires submitting JIRA tickets to DevOps teams. This creates a dependency and limits the autonomy of developers who have to wait for the tickets to be processed.😕⌛

On the other hand, DevOps teams have to directly handle Terraform code, taking into account various requirements that can become complex to manage due to the increasing complexity of modern infrastructures.😓💡

  • Dependence on DevOps teams for common tasks.👥🔗
  • Loss of autonomy for developers.🙅🚫
  • Frequent updating of Terraform code and sometimes tinkering to implement a requirement.🔧🔄
  • Increasingly complex Terraform code, lack of naming conventions, code duplication, large variables.📦🔢

The JSON-based approach📝🔧

An innovative solution is to provide developers with predefined JSON files that allow them to define the desired resources. These JSON files will serve as a data source for Terraform, enabling developers to create and manage their own resources autonomously. Here's how this approach works in practice:🧩💡

  1. Defining JSON files: DevOps teams create JSON files that describe the different available resources to create, such as GCP buckets. These files are designed to be user-friendly and intuitive, allowing developers to easily understand the available options and configure them according to their needs.📄🖊️
  2. Customizing JSON files: Developers have the ability to customize the JSON files based on their specific requirements. For example, they can specify the bucket name, storage options, access permissions, lifecycle rules, etc.🛠️🔧
  3. Parsing JSON files by Terraform: The JSON files are then parsed and consumed by Terraform to create the desired resources. Terraform uses this data to generate the appropriate Terraform code, eliminating the need for developers to directly manipulate the code themselves.🔄🔍
  4. Autonomous infrastructure creation: Developers now have a self-sufficient way of creating their infrastructure. By simply modifying the JSON files, they can create, update, or delete resources without relying on DevOps teams or directly touching the Terraform code.🏗️💪

The advantages✨🚀

Using JSON files to configure Terraform resources offers several significant advantages:

  1. Developer autonomy: Developers now have the ability to create and manage their own resources without depending on DevOps teams. This reduces wait times and improves overall team productivity.👩 🌟
  2. Reduced support time: By allowing developers to self-manage their resources, the number of Jira tickets submitted to DevOps teams decreases significantly. This frees up DevOps team resources, allowing them to focus on higher-value tasks.⏰✉️
  3. Cleaner Terraform code: The use of JSON files separates resource configuration from Terraform logic in a clear manner. This leads to more modular, maintainable, and easily understandable Terraform code for developers and DevOps teams.🧹📝
  4. Flexibility and scalability: JSON files can be extended and customized to support different parameters and project-specific configurations. This approach provides increased flexibility and scalability, making it easier to adapt to changing infrastructure needs.🔄📈

Practical case:

In this section, we will share a simple example with the accompanying Terraform code and, of course, the result.

We will start by showing you the directory structure of our project. 📁

  • env: Directory for tfvars files.
  • infra: Directory for JSON files.
  • terraform: Directory for the Terraform code.

Aucun texte alternatif pour cette image
Project directory structure

First and foremost, you can see that with this solution, we can create as many buckets as we want per environment.💡🔢

Aucun texte alternatif pour cette image
Exemple JSON

Now let's take a look at the main.tf file where we will implement our solution. 👀

Aucun texte alternatif pour cette image
main.tf

Now we will show you what the result of the terraform plan looks like. 👇

Aucun texte alternatif pour cette image
Terraform plan dev
Aucun texte alternatif pour cette image
Terraform plan ppr

Conclusion:🎉🔑

The use of Terraform in conjunction with JSON files provides a powerful solution to minimize support time, eliminate repetitive tasks, and empower development teams. By enabling developers to manage their own infrastructure using well-structured Terraform code, companies can accelerate deployment, reduce dependencies, and improve overall team productivity. So, unleash the potential of code and developer autonomy.💪💻🌟

Bravo Mohamed, you rock 🔥 🔥 👏🏻 👏🏻

To view or add a comment, sign in

Others also viewed

Explore content categories