VOOZH about

URL: https://thenewstack.io/infrastructure-as-code-from-imperative-to-declarative-and-back-again/

⇱ Infrastructure as Code: From Imperative to Declarative and Back Again - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2025-01-30 12:00:54
Infrastructure as Code: From Imperative to Declarative and Back Again
contributed,
Cloud Services / DevOps / Infrastructure as Code

Infrastructure as Code: From Imperative to Declarative and Back Again

The shift toward hybrid IaC models is driven by developer experience, efficiency, and the need for scalable cloud native solutions.
Jan 30th, 2025 12:00pm by Arel Rabinowitz
👁 Featued image for: Infrastructure as Code: From Imperative to Declarative and Back Again
Photo by Kevin Ku on Unsplash.

Infrastructure as Code (IaC) has gone through fascinating shifts over the years. The evolution of infrastructure management has been a story of constant iteration, shaped by the needs of scaling systems, velocity and safety metrics a lá DORA, and the demands of developer productivity.

From an imperative approach, where admins wrote detailed scripts to provision and configure infrastructure, the industry moved to declarative IaC, driven by the desire for scalability, repeatability, and reduced human error. Declarative tools like Terraform made it possible to define what the infrastructure should look like rather than specifying how to create it. This reduced complexity and improved reliability.

In 2025, we’re seeing a subtle but meaningful return to imperative methods — albeit with a twist. Let’s explore how the industry has shifted between imperative and declarative approaches, converging toward today’s hybrid models.

The Early Days: Imperative Configuration Management

In the early 2000s, tools like Chef and Puppet spearheaded infrastructure configuration automation. Paul Hammond and John Allspaw delivered the influential talk 10+ Deploys Per Day: Dev and Ops Cooperation at Flickr at O’Reilly’s Velocity Conference, demonstrating how modern tooling could transform engineering practices. At the time, achieving 10+ deployments a day seemed like science fiction.

Chef and Puppet, the most popular early configuration management platforms, became the backbone of this shift, introducing a fresh approach to configuring systems. However, they operated within an imperative paradigm, where users explicitly outlined the steps to achieve the desired configuration.

For instance, installing software required specifying each command, defining conditions, and meticulously controlling the sequence of operations.

While powerful, the imperative approach struggled with scalability and maintenance. Their reliance on this paradigm made scripts environment-specific and brittle, demanding significant manual effort to adapt to evolving infrastructure needs.

This led to several limitations:

  • Increased Complexity: Scripts grew unwieldy as infrastructure scaled.
  • Prone to Errors: Minor mistakes often cause inconsistencies, especially across environments.
  • Repetitive Logic (No DRY – Don’t Repeat Yourself): Duplicated code across scripts created a significant maintenance burden.

The Shift Toward a Hybrid Declarative Configuration

As the industry recognized the drawbacks of purely imperative approaches, tools like Ansible emerged as a transitional solution, blending imperative and declarative paradigms. It’s no surprise that Red Hat quickly acquired Ansible as it gained momentum. With its YAML-based playbooks, Ansible allowed users to define their infrastructure without specifying the exact steps to achieve it. While still executing tasks sequentially under the hood, Ansible embraced the declarative philosophy of describing outcomes over procedures.

Ansible’s success demonstrated the appetite for more abstraction in infrastructure management, paving the way for fully declarative tools.

The Declarative Revolution and the IaC Breakthrough

The transformation came with tools like Terraform and AWS CloudFormation, which embraced fully declarative models. Instead of focusing on procedural steps, users defined the desired state of their infrastructure in configuration files.

These tools reconciled this state with reality, automating the actions needed to achieve the outcome. Terraform introduced state files to track resources, enabling incremental updates and scalability, while CloudFormation leveraged JSON or YAML templates to manage AWS resources declaratively. Both offered distinct solutions to the challenges posed by imperative models.

This paradigm shift solved many of the issues inherent in imperative approaches:

  • Scalability: Declarative IaC scaled effortlessly across environments.
  • Consistency: State tracking ensured uniformity in deployments.
  • Efficiency: Teams could manage infrastructure without repeating procedural logic.

The Imperative Renaissance (Kind of)

Today, tools like Terraform CDK (TFCDK) and Pulumi have become popular choices among engineers. These tools allow developers to write IaC using familiar programming languages like Python, TypeScript, or Go. At first glance, this is a return to imperative IaC. However, under the hood, they still generate declarative configurations — such as Terraform plans or CloudFormation templates — that define the desired state of the infrastructure.

Why the resurgence of imperative-style interfaces?

The answer lies in a broader trend toward improving developer experience (DX), enabling self-service, and enhancing accessibility. Much like the shifts we’re seeing in fields such as platform engineering, these tools are designed to streamline workflows and empower developers to work more effectively.

Why Now?

The current landscape represents a blending of philosophies. While IaC tools remain fundamentally declarative in managing state and resources, they increasingly incorporate imperative-like interfaces to enhance usability.

The move toward imperative-style interfaces isn’t a step backward. Instead, it highlights a broader movement to prioritize developer accessibility and productivity, aligning with the emphasis on streamlined workflows and self-service capabilities.

  • Developer Familiarity: Many developers are more comfortable with general-purpose programming languages than YAML or domain-specific configuration languages. Using familiar code eliminates a steep learning curve.
  • Code Reuse: Developers can incorporate existing application logic into their IaC configurations. For example, code describing the behavior of application agents can be reused to define infrastructure setup.
  • Productivity Gains: Tools like TFCDK and Pulumi make IaC more approachable, democratizing infrastructure management. Developers can define infrastructure without switching contexts or learning entirely new languages.
  • Behind-the-Scenes Declarative Power: While developers write configurations imperatively, the underlying operations remain declarative. This ensures the preservation of scalability, consistency, and state management benefits.

Even in adjacent domains like CI/CD, we’re seeing this blending. Tools like Dagger and Buildkite let developers use familiar programming languages to define workflows, creating a more accessible experience while maintaining declarative outputs under the hood.

Full Circle in 2024/5

We’ve come full circle in many ways — but with a modern take on familiar concepts. The push for more developer-friendly interfaces isn’t about reinventing IaC but improving its accessibility and usability. Even after acquiring Red Hat (and, by extension, Ansible), IBM is now set to acquire HashiCorp, highlighting how much the IaC landscape has evolved.

Declarative IaC remains central, but newer tools offer imperative-like interfaces that better align with developer workflows and emphasize flexibility, productivity, and collaboration. These innovations reduce complexity, support collaboration scalability, and improve infrastructure management. They mirror trends in DevOps and cloud native development.

What’s Next and the Future of IaC

As the lines between imperative and declarative IaC blur, hybrid tools emerge to combine the best of both worlds. Improved state management, tighter integration with application logic, and enhanced multicloud support are driving the future of IaC toward simplicity and productivity. Different DevOps platforms (like env zero) are helping teams embrace these hybrid approaches to achieve more with less.

These models provide the flexibility of imperative-style coding while preserving the scalability and consistency of declarative IaC. The goal isn’t to choose one paradigm over another but to use their strengths together to meet evolving needs. Balancing old and new approaches will remain central to innovation in IaC as tools evolve.

TRENDING STORIES
Arel is a Principal Engineer in the env zero RnD team, and part of the founding core team for the OpenTofu project. He took part in bringing the OpenTofu project to a production-ready state, and was one of the people...
Read more from Arel Rabinowitz
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: Velocity.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.