First stack deploy
Create a new Pulumi project in TypeScript, provision one S3 bucket, run pulumi preview, then pulumi up. Capture the output value and destroy the stack.
DevOps & Tooling / Knowledge library
infrastructure as code with real programming languages
Pulumi lets teams define, deploy, and manage cloud infrastructure using familiar programming languages (TypeScript, Python, Go, C#, Java), reducing context switching and enabling reusable, testable infrastructure code.
2017: Pulumi was founded to modernize infrastructure as code with general-purpose languages. 2018: Early public releases introduced multi-cloud IaC with a developer-first workflow. 2019: Pulumi 1.0 launched. 2020+: Automation API enabled embedding Pulumi operations inside custom apps and platforms. 2023+: Pulumi ESC (Environments, Secrets, and Configuration) expanded secret/config management across projects.
Work through these exercises in order. Try the task before opening a reference.
Create a new Pulumi project in TypeScript, provision one S3 bucket, run pulumi preview, then pulumi up. Capture the output value and destroy the stack.
Use pulumi config to store a plain region and one secret API key. Read both in code, deploy a resource, and confirm the secret is encrypted in state.
Build a reusable ComponentResource that creates a bucket + IAM policy attachment. Instantiate it twice with different names and tags, then export both outputs.
Which command previews changes without applying them?
Pulumi can store state in Pulumi Cloud or self-managed backends like S3/Azure Blob/GCS.
Complete the blanks to create a private bucket and export its ID.
A global retail chain managing diverse cloud environments across multiple regions to support their e-commerce platform.
The engineering team struggles with fragmented infrastructure management, where different cloud providers require disparate tools and domain-specific languages, leading to configuration drift and inconsistent security postures.
Pulumi allows the team to define infrastructure using general-purpose programming languages like TypeScript, enabling the use of standard software engineering practices such as unit testing, modularity, and code reviews to manage cloud resources across providers in a unified workflow.
This diagram illustrates how code flows from the developer to the cloud provider through Pulumi.
Writes TypeScript code
Processes code and state
Target infrastructure
Target infrastructure
This code demonstrates defining cloud infrastructure using TypeScript, which allows the retail team to use standard programming constructs to manage AWS resources.
import * as aws from "@pulumi/aws";
// Define an S3 bucket using standard TypeScript classes
const bucket = new aws.s3.Bucket("retail-data", {
acl: "private", // Enforce security policy
});
export const bucketName = bucket.id; // Export for cross-stack referenceThe team achieves a consistent infrastructure lifecycle, reducing manual configuration errors and enabling developers to provision resources using familiar programming patterns without learning proprietary configuration languages.
Because infrastructure is defined in general-purpose languages, the state file can become complex to manage if the code is not structured with strict modularity; developers should check the Pulumi state output regularly to ensure the logical graph remains performant.