Your web browser is out of date. Update your browser for more security, speed and the best experience on this site.

Here's how you use Pulumi to manage your cloud infrastructure.

Managing your infrastructure in the cloud has its benefits, but it also brings along a host of complex issues. Axxes developer Lode Kennes explains how Pulumi can solve some of these challenges.

Companies and organizations migrate their infrastructure to the cloud for a variety of reasons. It's scalable, automatic backups are made, and in many cases, it's more cost-effective... All very convenient, but manual management can quickly become overwhelming.

Just ask Lode Kennes, a .NET developer at Axxes who primarily focuses on cloud-first applications in Azure, alongside his fondness for React and React Native. Lode works in Azure environments that often contain more than 300 resources, which can lead to problems. You never know exactly what someone changed, when and why it happened, and what the previous settings were. While there are activity logs, they have their limitations.

Infrastructure as Code, or IaC, provides a solution. This approach allows you to build your infrastructure in cloud providers like AWS and Azure not by clicking manually, but by adopting the same philosophy as writing code. It's a convenient way to implement CI/CD and keep your development, acceptance, and production environments consistent.


Share article
Infrastructure
Services cloud smal

The benefits of IaC

Thanks to IaC, you can precisely define how your infrastructure looks, what it does, and how it functions. This makes it easier to reproduce the infrastructure when necessary. Your struggles with changes are a thing of the past because IaC comes with version control. For example, you can easily track all changes in the infrastructure in Git and revert to previous versions if needed.

Because the infrastructure is defined in code, you can easily test it to ensure that everything works as expected. You don't have to do this alone, as IaC allows you to collaborate smoothly with others on the infrastructure, since all configurations are stored in code.

IaC enables you to automate infrastructure tasks, saving time and effort and reducing errors. This allows you to deploy your infrastructure along with your code, making it much easier to keep different environments in sync. You run the same code everywhere, ensuring everything is always synchronized.

Pulumi

There are several tools to get started with IaC, including Terraform and Ansible. In this article, we'll look at Pulumi, which integrates smoothly with cloud providers like Amazon Web Services (AWS), Azure, and the Google Cloud Platform (GCP). What sets it apart from the competition is its support for multiple programming languages, including JavaScript, TypeScript, Python, and Go. This makes it very accessible, as you can use the same language you're already using for your project. Pulumi is free for one user and offers different pricing tiers based on the size of your team and ambitions.

One of the key tips is to put everything, including your configurations and secrets, in Pulumi. If you don't do this, it becomes confusing to determine what is managed by code and what you still do manually. Take the time to give clear names to your resources, and avoid blindly copying things from a tutorial.

Consider using micro stacks for distributed applications: use one stack per microservice, keep everything deployable separate, and use a service principal to approve manual changes, so users can't easily modify or delete things.

Perhaps the most important tip is to start experimenting with Pulumi today. It may not seem useful now, but you'd rather make the switch at the beginning of a project than halfway through. Otherwise, you could end up manually managing 300 resources - with all the associated risks.

Our Insights straight to your inbox? Sign up now!

Lode Kennes

Lode Kennes

Axxes