Home / Companies / Pulumi / Blog / Post Details
Content Deep Dive

Improved Pulumi Experience with .NET 6

Blog post from Pulumi

Post Details
Company
Date Published
Author
Zaid Ajaj
Word Count
1,202
Language
English
Hacker News Points
-
Summary

Pulumi has integrated .NET 6, the latest Long-Term Support version of .NET, as the default across its ecosystem, enhancing the simplicity and functionality of Pulumi C# projects. The .NET templates have been updated to target net6.0, streamlining program structure by removing the need for MyStack classes in C# and VB.NET while maintaining the existing approach for F#. The updated template framework allows for using modern C# 10 features, such as top-level statements that simplify entry points and asynchronous function calls without traditional main functions or classes. The Deployment.RunAsync function now supports flexible resource definition and output handling, allowing developers to utilize target-typed new expressions for instantiation. Despite these updates, the main Pulumi SDK and cloud provider packages remain backward-compatible with netcoreapp3.1. Pulumi's code generation tools have also been updated to leverage .NET 6 features, offering improved translation of infrastructure as code (IaC) languages into Pulumi-supported languages, including C#, through tools like pulumi convert, arm2pulumi, and kube2pulumi.