Blog
Here is a list of articles I wrote to share my learnings about Development, Tooling and DevOps.
Tooling
Call your Azure AD B2C protected API with authenticated HTTP requests from your JetBrains IDE
I have written several blog posts about HTTP clients in the past. I am a big fan of using HTTP text files versioned in a git repository alongside API code and executed by an IDE tooling. However, there was one use case where a GUI tool like Postman or a swagger page was more convenient: retrieving OAuth 2.0 users' tokens. Thanks to the latest OAuth 2.0 feature in JetBrains' IDE built-in HTTP client, this is no longer an issue.
Development
Using dependency injection with Azure .NET SDK
I love how the Azure SDKs have evolved over the years. In the past, there was no consistency between the various Azure SDKs. However, that's not longer the case (at least for most Azure libraries), as they now adhere to the same principles and follow a set of well-defined guidelines.
DevOps
Effortlessly Configure GitHub Repositories for Azure Deployment via OIDC
What if we could script the creation and configuration of a GitHub Repository so that it is ready to provision or deploy Azure resources from a GitHub Actions pipeline? We will do that in this article using the Azure CLI and GitHub CLI.
DevOps
Deploying to Azure from Azure DevOps without secrets
If you are deploying your application to Azure from Azure Pipelines, you might want to leverage the ability to do so without using secrets thanks to Workload identity federation. In this article, I will demonstrate how to automate the configuration of your Azure DevOps project, with everything pre-configured to securely deploy applications to Azure.
DevOps
Create an Azure-Ready GitHub Repository using Pulumi
Creating an application and deploying it to Azure is not complicated. You write some code on your machine, do some clicks in the Azure portal, or run some Azure CLI commands from your terminal and that's it: your application is up and running in Azure.
Tooling
Discussion about API clients
This article is a discussion about API clients. Without being a comparison between the best API clients, this article talks about the pros and cons of some popular tools to send HTTP requests to an API. The goal is not to elect the best one, but rather to try to answer the following question: what we should consider when choosing an API client, and what are the challenges when using one?
Essay
What can we do when stuck with a programming problem?
Like I wrote in my last article, as a developer sometimes you get stuck on a problem for a few hours or a few days, your code won't work, and you think nobody can help you 😿. This can be very frustrating, but fortunately, there are plenty of ways to look for a solution or to seek help. You are probably already using some of them with success, yet there may be some you don't think of and that could help you a lot. That is the topic of this article.
Tooling
Keeping secrets secure when using API Clients
When using some API Clients (like REST Client or the HTTP Client of JetBrains' IDEs), environment variables are stored in JSON files that can contain secrets. To share these files within a team, developers tend to send them by email or by messaging applications, which is not very convenient nor secure 🔐. I thought it would be a good idea to store these secrets directly in an Azure Key Vault and automate the generation of a JSON file containing the secrets using Azure CLI and Nushell.
DevOps
Why will I choose Pulumi over Terraform for my next project?
In today's world of cloud-first applications, multi-cloud/hybrid cloud companies, and complex infrastructures, using infrastructure as code is essential. In recent years, Terraform has become one of the most popular IaC solutions, but its challenger Pulumi is quickly gaining traction. In this article, I will tell you why I think Pulumi is better and why I will choose it over Terraform for my next project.
DevOps
Pulumi with an Azure Blob Storage backend
By default when you use Pulumi, the state is managed by Pulumi Service which is very convenient as you can concentrate on building your project infrastructure instead of spending time on where to store the state and how to handle concurrency. However, sometimes for governance or pricing concerns, or any other reasons, you don't want to use Pulumi Service and you prefer to manage the state yourself with your own backend. In this article, we will see how we can do that using Azure.
Tooling
Organize your GitHub stars with Astral
Do you often star a GitHub repository and later when you want to get back to it struggle to find it on your stars page? I do! Well, I did... until I discovered Astral, the web application that allows you to Organize Your GitHub Stars With Ease. That is what we are going to talk about in this article.
Development
ASP.NET Core - Lost in configuration
Have you ever felt a bit overwhelmed by the configuration in a project, not knowing where to look for the settings between the command line parameters, the environment variables, the configuration files in code, the configuration in Azure, ... ? When developing an ASP.NET Core application there are many places where you can put your configuration which makes it difficult to know where you should put it. Even if the official documentation about configuration in ASP.NET Core is very complete and well written, it only describes what you can use and how to use it, not what you should use and when. In this article, I will try to answer these questions and give you my opinion about how we should use configuration providers in ASP.NET Core.
DevOps
AzureWebJobsStorage, the secret you don't need in your Function App.
If you are using Azure Functions chances are you are using the setting AzureWebJobsStorage in your Function App configuration. And it is quite likely that the value of this setting which is a secret is stored in a non-secured way directly in your Function App configuration, available to anyone who has access to this configuration. But do not worry, we will see in this article how we can make your Function App more secure by removing this secret.
Tips
4 tips about GitHub Actions environment variables and contexts
I recently played a bit with GitHub Actions and as I have spent some time running, again and again, my workflows to understand what was going wrong I thought it could be interesting to share what I have learned especially concerning environment variables and contexts.
Tooling
Customize your applications when installing them with winget
In my last article about Windows Package Manager, I said that with winget I was missing "being able to specify some parameters for a package installation (like the workload and components to install for Visual Studio 2019)". Well, that was before I went through a few GitHub issues of the winget-cli repository that mentioned the override option.
Development
Once upon a time in .NET
In this article, I want to talk about a few things in .NET such as HTTP requests with an Http Client, HTTP message handlers, records... For the theoretical aspect of these topics, I think the official documentation on docs.microsoft.com and many blog articles already explain them very well, better than I could ever do. But what I am interested in here is to talk about these topics through a case study.
Tips
Week 9, 2021 - Tips I learned this week
I often see developers talking on Twitter or Dev.to about things they have learned during the previous day or the previous week. I like the idea so I decided to write my first article about tips I learned during this past week. I am not intending to write an article like this every week but from time to time when I feel I have something interesting to share or that I want to keep track of for myself.
Essay
Forget DevOps, the future is already here!
DevOps has been the trendy term for quite a few years now. Lots of companies including the biggest companies in Silicon Valley have started adopting DevOps practices. However the DevOps journey is not an easy one, so you might wonder if DevOps is suited for you and your company. Do now worry anymore, you can forget about DevOps because your company is probably already using the best practices in IT, and these are not DevOps practices. Let's take a deep dive into some of these practices in this article.
Development
You almost no longer need Key Vault references for Azure Functions.
The possibility to add configuration sources in Azure Functions has just been released with the latest version of Microsoft.Azure.Functions.Extensions NuGet package. I have been waiting for this feature for a long time (like many people I think) because it brings to Azure Functions all the things we are used to with configuration in ASP.NET Core 😻. But that is not the only reason, it is also because with this feature you almost don't need to use key vault references!
Development
Handle token retrieval while querying an API
In our daily job, we often have to query secure REST APIs that require our HTTP requests to have a valid access token in their Authorization header.
Of course, many APIs come with an SDK that makes the job easier for us as it directly takes care of retrieving a token and sending the authenticated HTTP requests.
However, it is not always the case and knowing how to implement that using HttpClient, IMemoryCache, and DelegatingHandler can become pretty useful.
Development
HTML templating in Xamarin
There are often situations where you need to do some HTML templating and having a powerful HTML templating engine like Razor can be really helpful.
What is nice is that you don't need to be in an ASP.NET context to use Razor templates, in fact, you can even use them in a Xamarin Application.