Pulumi New Command Architecture

The initialization of an infrastructure-as-code project is a foundational operation that dictates the structural integrity and runtime environment of cloud resources. The pulumi new command serves as the primary entry point for developers to transition from an empty directory to a fully configured project and stack. This command is not merely a file generator but an interactive orchestrator that handles the selection of language templates, the configuration of cloud providers, and the establishment of state management backends. By abstracting the complexity of initial project bootstrapping, pulumi new allows engineering teams to rapidly prototype and deploy scalable infrastructure across multiple cloud and SaaS providers using general-purpose programming languages.

The Mechanics of Project Initialization

The pulumi new command is designed to create both a Pulumi project and a stack from a predefined template. A project, in this context, is defined as a program written in a chosen language that defines a collection of related cloud resources. The transition from a conceptual infrastructure design to a physical implementation begins with the creation of a dedicated directory.

To begin the process, a developer must first establish a workspace. This is typically achieved through standard terminal commands:

mkdir pulumi-start-aws

cd pulumi-start-aws

Once inside the directory, the pulumi new command is executed. This command triggers an interactive walkthrough that guides the user through the initialization of the project, the creation of a stack, and the configuration of essential environment variables.

A stack is an instance of a project. This architectural distinction is critical because it allows developers to maintain separate environments for the same project. Common examples include dev, staging, and prod. Each stack can have its own unique configuration settings, enabling a seamless promotion of infrastructure from development to production without altering the underlying project code.

Template Selection and Implementation

The pulumi new command offers multiple pathways for template selection, depending on the developer's needs for speed, customization, or testing.

If a developer provides a specific template name, Pulumi initializes the project using that exact specification. For those targeting Amazon Web Services (AWS), the following templates are available:

  • pulumi new aws-typescript
  • pulumi new aws-python
  • pulumi new aws-go
  • pulumi new aws-csharp
  • pulumi new aws-java
  • pulumi new aws-yaml

In scenarios where no template name is explicitly provided, the Pulumi CLI presents a list of suggested templates. The user can then interactively select the most appropriate option for their current requirements. For advanced testing purposes, the CLI supports the use of local templates. A developer can pass a path to a local template directory, such as ~/templates/aws-typescript, to ensure consistency across multiple internal projects.

Secrets Management and Backend Integration

The security of sensitive data is managed through secrets providers, which are determined by the backend chosen during the pulumi new process. The backend is the location where the state of the infrastructure is stored.

The relationship between backends and secrets providers is as follows:

Backend Type Secrets Provider
pulumi.com pulumi.com secrets provider
Local passphrase secrets provider
Cloud Object Storage passphrase secrets provider

The use of the pulumi.com secrets provider ensures that sensitive data is encrypted and managed via the Pulumi Service, whereas local or object storage backends rely on a user-defined passphrase to secure the state. This ensures that regardless of the storage medium, infrastructure secrets remain protected from unauthorized access.

Bun Runtime Integration

A significant evolution in the Pulumi ecosystem is the full support for Bun as a runtime, introduced in Pulumi 3.227.0. Previously, Bun was limited to acting as a package manager; however, it is now a first-class runtime option.

Developers can initialize a project specifically for Bun using:

pulumi new bun

Bun is a fast JavaScript runtime developed by Jarred Sumner, first previewed in May 2021 and released as version 1.0 in September 2023. It is built using the Zig programming language and powered by JavaScriptCore (the engine used by Apple's WebKit), rather than the V8 engine utilized by Node.js and Deno.

The impact of this integration is most evident in performance and ergonomics. Bun provides 4x faster startup times, with ranges between 5–15ms compared to the 60–120ms seen in Node.js. Furthermore, package installation is 6–35x faster.

From a technical standpoint, Bun allows for the use of top-level await. In traditional CommonJS Pulumi programs, awaiting a data source before declaring resources required the program to be wrapped in an async entrypoint function. With Bun's full ESM (ECMAScript Modules) support, top-level await works at the module level, which significantly simplifies the program structure.

To configure this runtime, developers set runtime: bun in the Pulumi.yaml file. This removes the requirement for a Node.js installation.

Migration and Technical Constraints of Bun

Teams transitioning from a Node.js-based project to Bun must follow a specific configuration path to ensure compatibility.

The migration process involves the following steps:

  • Update the runtime field in Pulumi.yaml to bun.
  • Adjust tsconfig.json to utilize Bun's recommended compiler options, specifically setting module: "Preserve" and moduleResolution: "bundler".
  • Add "type": "module" to the package.json file to explicitly opt into ESM.

Despite the performance gains, there are critical limitations to the Bun runtime. Pulumi's callback functions, often referred to as magic lambdas, are not supported. This is because these functions rely on function serialization that depends on the inspector modules and Node.js v8, which are not fully available in Bun. Similarly, dynamic providers are unsupported for the same reasons.

For teams that require callback functions or dynamic providers, the recommended configuration is to remain on runtime: nodejs. However, these teams can still leverage Bun's performance for package management by setting packagemanager: bun within their Node.js runtime configuration.

The system requirements for this integration are Bun 1.3 or later and Pulumi 3.227.0 or later.

Agentic Infrastructure and Pulumi Neo

The introduction of Pulumi Neo marks a shift toward an agent-native infrastructure era. Neo is an artificial intelligence-based platform engineering agent launched in public preview on September 16th. It is designed to solve the "velocity trap," a phenomenon where AI coding assistants speed up application development, but platform teams cannot maintain the same pace, creating a bottleneck in infrastructure provisioning.

Neo operates as a built-in agent within Pulumi Cloud. It is a fully agentic platform engineering tool that automates the end-to-end lifecycle of infrastructure, including provisioning, management, and optimization.

The capabilities of Neo include:

  • Independent execution of complex infrastructure tasks.
  • Understanding of dependencies across various cloud resources.
  • Generation of detailed previews and histories for all automated actions.
  • Built-in governance, compliance, and multi-cloud support.

To extend the utility of Neo beyond the cloud console, Pulumi has integrated the agent into the local developer workflow. The pulumi neo command allows the agent to run directly from the local terminal. This provides Neo with direct access to the developer's source tree and local tools while maintaining the same agentic loop as the cloud version.

Further integration includes:

  • Neo GitHub App: Allows teams to ping @neo on pull requests to investigate failed deployments, propose fixes, and review changes.
  • Neo Slack App: Integrates @neo into communication channels where incident threads and infrastructure discussions occur.
  • Read-only Sessions: These sessions limit the agent to inspection-only work, which is ideal for low-stakes reporting and compliance checks.

Specialized AI Infrastructure Providers

As part of the expansion into agentic infrastructure, Pulumi has released infrastructure-as-code providers for high-performance AI workloads.

The integration with NVIDIA’s AI Cluster Runtime enables teams to snapshot known-good combinations of OS kernels, GPU drivers, and Kubernetes versions. These snapshots can then be applied as criteria for future deployments. This eliminates configuration drift, a common failure point in GPU-intensive workloads. Pulumi is also a participant in NVIDIA's Inception program.

Additionally, Pulumi has integrated with CoreWeave's GPU platform and Weights & Biases. This connectivity allows AI teams to use infrastructure-as-code for CoreWeave's purpose-built AI platform. This streamlines the model development workflow, linking compute provisioning, training, optimization, and deployment into a single toolset.

Summary of Technical Specifications

The following table summarizes the key technical configurations and requirements for Pulumi project initialization and runtime options.

Feature Requirement / Value Notes
CLI Version v3.248.0 (Reference) Current supported version for pulumi new
Bun Runtime Version 1.3+ Required for runtime: bun
Pulumi Version for Bun 3.227.0+ Required for full Bun runtime support
Bun Startup Time 5–15ms 4x faster than Node.js
Node.js Startup Time 60–120ms Standard V8 runtime performance
Bun Package Install Speed 6–35x faster Compared to Node.js
Bun Engine JavaScriptCore Apple's WebKit engine
Node.js Engine V8 Standard Chrome/Node engine
Bun Licensing MIT Open source

Analysis of the Agentic Infrastructure Transition

The transition from traditional Infrastructure as Code (IaC) to agentic infrastructure represents a fundamental shift in how cloud environments are managed. For years, the primary hurdle in platform engineering was the manual effort required to translate a developer's request into a set of cloud resources. The pulumi new command provided the structure, but the execution remained a human-driven process of writing and auditing code.

The introduction of Pulumi Neo and the integration of AI agents change this dynamic by creating a "single substrate" for provisioning. Because Pulumi uses real programming languages—Python, TypeScript, Go, C#, and Java—it provides a format that is natively understandable by both human engineers and Large Language Models (LLMs).

The "velocity trap" described by CEO Joe Duffy is a critical observation of the current AI era. When application code is generated in seconds by AI, but the environment it runs in takes days to provision via a tickets-and-PR workflow, the efficiency gain is negated. By allowing an agent like Neo to handle the "long-horizon, high-blast-radius work," Pulumi is attempting to align the speed of infrastructure provisioning with the speed of AI-assisted application development.

Furthermore, the move toward specialized providers like NVIDIA and CoreWeave indicates that the future of IaC is not just about general-purpose cloud VMs, but about highly specialized, hardware-accelerated environments. The ability to snapshot and replicate precise GPU configurations is essential for the reproducibility of AI models, as slight variations in driver versions or kernels can lead to divergent results in model training.

In conclusion, the evolution of the pulumi new ecosystem—from basic template initialization to the integration of high-performance runtimes like Bun and the launch of the Neo agent—reflects a broader movement toward autonomous, verifiable, and high-performance infrastructure. The shift toward agent-native infrastructure ensures that as software development continues to accelerate, the underlying platform can scale and adapt in real-time, governed by strict policy enforcement and audit trails.

Sources

  1. Pulumi CLI Commands
  2. Pulumi Bun Support
  3. Get started with Pulumi and AWS
  4. Pulumi Neo
  5. The Infrastructure Agent Era
  6. Pulumi AI Deployment Gap

Related Posts