Skip to content

Blog post for CLI AI additions #14970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
May 22, 2025
Binary file added content/blog/cli-ai-extensions/explain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
89 changes: 89 additions & 0 deletions content/blog/cli-ai-extensions/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
title: "Pulumi Updates, Explained: AI-Powered Features in Pulumi CLI"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just me, but this parses a little funny. Any reason not to just say

Suggested change
title: "Pulumi Updates, Explained: AI-Powered Features in Pulumi CLI"
title: "AI-Powered Infrastructure as Code Features in Your CLI"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intent was to say that pulumi updates are now explained with AI, but maybe it came out a little awkward.
Maybe simply "AI-Powered Features in Pulumi CLI"? ("Infrastructure as Code" is applicable to everything we do and feels a bit redundant here)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree it's funny but also it's not boring and has some charm to it, in a sense. I'll keep it as-is.

date: 2025-05-21
draft: false
meta_desc: AI-powered CLI features simplify deployments by translating complex changes into clear explanations and providing actionable guidance for resolving errors.
meta_image: meta.png
authors:
- artur-laksberg
- mikhail-shilkov
- simon-howe
tags:
- copilot
- ai
- iac
- cli
social:
twitter: "🤖 Introducing AI-powered features in Pulumi CLI! Get plain-language explanations of infrastructure changes and actionable insights for error resolution. Try it today with --copilot flag! #Pulumi #AI #IaC"
linkedin: "Excited to announce AI-powered features in the Pulumi CLI! ✨ Our new 'explain' feature translates complex infrastructure changes into clear, human-readable summaries, while our AI error analysis transforms cryptic cloud provider error messages into actionable guidance. Enable with --copilot flag and let us know what you think!"
---

We're excited to announce the new AI capabilities for Pulumi CLI powered by Pulumi Copilot that translate complex infrastructure changes into clear, human-readable explanations and help resolve deployment errors with actionable guidance. Enable these preview features with the `--copilot` flag.

<!--more-->

At Pulumi, we're committed to helping you deploy infrastructure efficiently and with minimal friction. Anyone who has worked with cloud infrastructure knows the frustration of sifting through large previews with numerous changes and the difficulty of interpreting cryptic error messages from cloud provider APIs when deployments fail.

There are two key challenges we've identified:

1. **Understanding Preview Changes**: Reviewing raw update previews can be overwhelming, especially for complex deployments with many resources. It's difficult to quickly grasp the full scope and impact of pending infrastructure changes.

2. **Interpreting Error Messages**: When deployments fail, cloud providers often return error messages that, while comprehensive, bury the core issue within extensive diagnostics, requiring specialized expertise to interpret and address.

Our latest CLI update introduces AI capabilities that tackle both issues. Let's explore how these new features improve your infrastructure management workflow.

## Update Explanation

To address the first challenge above, we've introduced a new "explain" menu item in the CLI. When running pulumi preview or `pulumi up` with the `--copilot` flag, you'll see this option in the interactive menu:

![Preview menu with the explain option](preview.png)

In this screenshot, you can see the standard Pulumi update preview showing an AWS VPC with multiple subnets, route tables, and gateways that need to be updated. The interactive menu at the bottom shows the new "explain" option with a sparkle emoji, indicating the AI-powered feature.
When selected, this tool analyzes and provides a clear summary of all changes in your pending infrastructure update:

![Preview explanation by Pulumi Copilot](explain.png)

In this example, the AI explanation immediately identifies that this is a "VPC Renaming Operation - Tag Updates Only" and explains that the update is simply changing tags across all components. It clearly states this is a "safe, non-disruptive change that only affects resource labels."

This explanation serves as a valuable sanity check before deployment. It presents a plain-language summary of exactly what changes will occur, helping you verify that the planned modifications align with your intentions. This visibility is particularly valuable when managing complex infrastructure with many resources, as it helps identify unexpected changes or potential drift between your code and deployed resources. The system also proactively flags potential issues such as security vulnerabilities or destructive updates that might impact your production environment.

## Diagnostics Summarization

For the second challenge, when infrastructure deployments fail, cloud providers often return error messages that are technically accurate but difficult to decipher without specialized knowledge. Consider the following scenario where a Go-based Docker image build fails with vendoring issues:

![Error from the Docker Build provider](summary.png)

In this example, the standard Go build process failed with a cryptic error about inconsistent vendoring. While the raw output does contain the necessary information, it's buried within extensive build logs. Our AI-powered Copilot diagnostics immediately identifies the problem and provides a clear, actionable solution: "Docker image update failed due to inconsistent vendoring. Sync vendor with 'go mod vendor'."

This clear explanation identifies root causes and provides actionable guidance, transforming dense technical output into concise explanations. It reduces time to resolution by pinpointing both the problem and the exact command needed to fix it, eliminating the need to search through documentation or guess.

## Getting Started

The AI-powered features are currently in preview. You can enable them by adding the `--copilot` flag to your Pulumi CLI commands:

```bash
pulumi preview --copilot
pulumi up --copilot
```

These features require Pulumi CLI version v3.171.0 or greater and the Pulumi Cloud backend. Organization administrators must enable Pulumi Copilot by navigating to **Settings > Access Management > Pulumi Copilot** in the Pulumi Cloud console.

During this preview period, we're focused on:

- Refining explanations based on user feedback
- Adding new capabilities like suggesting fixes for common errors
- Improving performance to ensure minimal impact on command execution time

We will continue to monitor usage patterns and incorporate your feedback before enabling these features by default.

## Share Your Feedback

We're excited to see how these AI-powered insights enhance your infrastructure deployment workflow! Please share your experiences with us:

- Connect with us in the [Pulumi Community Slack](https://slack.pulumi.com)
- Open an issue on [GitHub](https://github.com/pulumi/pulumi)
- Learn more about [Pulumi Copilot](http://pulumi.com/copilot)

Try this today, [Get Started with Pulumi for free](https://pulumi.com/start)

Your input will directly influence how we evolve these features from preview to general availability.
Binary file added content/blog/cli-ai-extensions/meta.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/blog/cli-ai-extensions/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/blog/cli-ai-extensions/summary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading