Ulzurrun de Asanza i Sàez

Migrating OVH DNS records from Terraform to Pulumi

This post is part of my series on migrating my Homelab from Terraform to Pulumi. Here, I’ll walk through how I manage DNS records in Pulumi and how I imported them from Terraform so the migration can be fully automated.

Read more →

Why I am migrating my Homelab IaC from Terraform to Pulumi

Last year, I repurposed an old PC as a home server. Before that, I was already running a few Docker containers on a Synology NAS, but I wanted something more cost-effective—especially when it came to storage capacity.

One of my goals was to define the entire setup as code. I wanted to avoid clicking around in the UI and waiting for pages to load every time I needed to change a setting. So I installed Proxmox (manually), set up API credentials, and jumped on the Terraform bandwagon. With it, I defined all my containers, firewall rules, and the public and private domain names needed to access my services.

Read more →

2026 New Year’s resolutions

Every end of the year, I think about getting back to writing regularly on this blog. And every year, it somehow slips away. Sometimes I lack inspiration. Sometimes I’m unsure what to write about. Other times I worry that what I share might be too obvious or not worth posting.

This year, however, I want to do things differently. Over the past few months, I’ve been working on a couple of projects that have sparked new ideas. I now have notes, discoveries, and stories worth sharing—both about the work itself and the motivation behind it. Writing this down publicly should also help keep me accountable.

I’ll begin with my Homelab and its migration from Terraform to Pulumi. I’m also planning to redesign this website and potentially move away from WordPress on the client side. Expect a few posts on each project, along with regular progress updates.

Although I’m writing mainly for myself, as a kind of learning journal, I hope some of it proves useful to you as well.

See you around!

How to write type-safe nested key paths in TypeScript

Recently I had to write a type-safe function that allowed to update (nested) paths of a JavaScript object. I wanted the function to prevent setting a wrong value to the requested path, even nested ones with optional values.

After playing a bit with TypeScript type system I came up with these types which I think can be useful and will be using for sure in future projects. You can play with it in this playground or see the code right below:

export type KeyPath<
    T extends string,
    K extends string,
    Separator extends string = ".",
> = `${T}${"" extends T ? "" : Separator}${K}`;

export type KeyPaths<T extends object, P extends string = "", Separator extends string = "."> = {
    [K in keyof T]-?: K extends string
        ? NonNullable<T[K]> extends object
            ? KeyPath<P, K, Separator> | KeyPaths<NonNullable<T[K]>, KeyPath<P, K, Separator>, Separator>
            : KeyPath<P, K, Separator>
        : never;
}[keyof T & string];

export type GetTypeAtKeyPath<T, Path extends string, Separator extends string = "."> = Path extends keyof T
    ? T[Path]
    : Path extends `${infer K}${Separator}${infer Rest}`
      ? K extends keyof T
          ? NonNullable<T[K]> extends object
              ? GetTypeAtKeyPath<NonNullable<T[K]>, Rest, Separator>
              : never
          : never
      : never;
Code language: TypeScript (typescript)

Let’s dig into how to use it and how KeyPath, KeyPaths and GetTypeAtKeyPath work and how to use it.

Read more →

How to write WordPress Themes with SASS, TypeScript, and HMR

Not interested in all the details? I shared a twentytwenty child theme with SASS, TypeScript, and HMR applying all the ideas in this post that you can use as a starting point.

Modern front-end developer experience is nicer than the one we had in 2007 when WordPress came out.

Regular WordPress themes require reloading the entire page when any JavaScript or CSS changes. However, with tools like Vite we can achieve a state-of-the-art developer experience.

In this post I will guide you through all the steps required to add SASS, TypeScript, and HMR support to any WordPress theme.

A Twenty Twenty child theme with SASS stylesheet and HMR, and early preview of what we will achieve by the end of the post.
Read more →

Structured JSON logging in AWS Lambda with Kotlin and Log4j2

JVM ecosystem has a steep learning curve: missing a Maven/Gradle dependency might end up being a cryptic runtime exception about a package that is partially referenced in an XML file. I experienced this recently at work, trying to set up Log4j2 to write JSON logs in an AWS Lambda function.

Read more →

How to make Docker build faster reducing build context size

When you build a Docker image you will notice a “transferring context” step in the output (“Sending build context to Docker daemon” in older Docker versions) that can take a lot of time. This step is just Docker copying local files so keeping those to the minimum will make this step faster.

Read more →

Throttle and debounce visualized

throttle and debounce are two functions widely used in frontend applications but they are confusing and oftentimes used interchangeably even though they are not the same thing. In this article we’ll review both and clarify their differences (or go directly to the interactive demo showcasing the differences).

Read more →

How to reduce Docker images size

It’s easy to make Docker images bigger than needed. This has a negative impact in both push and pull time but it may also be hiding additional problems you should address before they become critical.

In this post I will explain you three techniques to help you slim down your Docker images:

Read more →

Geoblink Design System

There are days when you know you are working on something amazing. You would love to share it with the world, but cannot. I felt that every single day at the office for months, knowing that someday – eventually – I would be able to share this project. Finally – today – Geoblink’s Design System has been open sourced (GitHub repository).

Geoblink’s Design System is open source.

Read more →