Skip to content
Tutorials Center
My learning

Topics

Pulumi Tutorial

Learn Pulumi step by step: 36 lessons in 9 chapters with examples, quizzes, diagrams and projects.

Start learning →

of lessons completed

Getting Started

  1. 1 What Is Pulumi? Infrastructure as Code in Real Languages Learn what Pulumi is, how it describes cloud infrastructure with TypeScript, Python, Go or C#, and how it differs from Terraform, CloudFormation and manual clicking.
  2. 2 Install Pulumi and Create Your First Project Install the Pulumi CLI, choose a backend, log in, scaffold a project with pulumi new and understand every file it creates, with read-only commands and runnable stand-ins.
  3. 3 Project Layout: Pulumi.yaml, Stack Files and Entry Points Understand the Pulumi project layout: Pulumi.yaml fields, runtime options, stack configuration files, entry points in each language, .gitignore and how to organise a repository.
  4. 4 pulumi up, preview, refresh and destroy Learn the core Pulumi commands: preview, up, refresh, destroy, cancel and stack output. Read the diff symbols, use flags like --diff and --yes, and see the update cycle.

Concepts and Stacks

  1. 5 Pulumi Stacks and Projects: Dev, Staging and Prod Understand Pulumi stacks: isolated instances of a project for dev, staging and prod. Learn stack commands, fully qualified names, tags, and how to structure environments.
  2. 6 Desired State, URNs and How Pulumi Diffs See how Pulumi decides what to change: resource registration, URNs, check and diff, in-place update versus replacement, and the create-before-delete rule, with runnable stand-ins.
  3. 7 Pulumi Inputs and Outputs: Understanding Output<T> Learn why Pulumi uses Output values, how inputs flow from one resource to another, what happens during preview, and why you cannot print an Output directly.
  4. 8 Pulumi Providers: Packages, Versions and Explicit Providers Learn how Pulumi providers work: native and bridged packages, plugin versions, default versus explicit providers, multiple regions or accounts, and the provider resource option.
  5. 9 Pulumi Stack Outputs and Stack References Export values from a Pulumi stack, read them with the CLI, and share them between projects with StackReference. Includes secrets in outputs and layering network, data and app stacks.

Resources and Programs

  1. 10 Pulumi Resource Options: dependsOn, protect, aliases, ignoreChanges Master Pulumi resource options: parent, dependsOn, protect, retainOnDelete, ignoreChanges, replaceOnChanges, deleteBeforeReplace, aliases, import, transforms and auto-naming.
  2. 11 Pulumi Programs in TypeScript, Python, Go, C#, Java and YAML Compare the same Pulumi program in six languages: TypeScript, Python, Go, C#, Java and YAML. Learn naming conventions, how Outputs differ per language and how to choose one.
  3. 12 apply, interpolate, all and Other Pulumi Output Helpers Work with Pulumi Output values: apply, interpolate, concat, all, unsecret, jsonStringify, lifting property access, secrets and common pitfalls, with runnable stand-ins.
  4. 13 Pulumi Dependencies, Ordering and Parallelism Learn how Pulumi builds its dependency graph from Outputs, when to use dependsOn, how parallelism and --parallel work, deletion order, and how to view the graph and avoid cycles.
  5. 14 Loops, Conditionals and Functions in Pulumi Programs Use real programming features in Pulumi: loops and maps to create many resources, conditionals per stack, helper functions and types, stable names, and the pitfalls of looping over Outputs.

Config and Secrets

  1. 15 Pulumi Config Basics: pulumi config and the Config Object Learn Pulumi configuration: set and read values with pulumi config, key namespaces, typed getters in TypeScript, Python and Go, defaults, structured values and validation.
  2. 16 Pulumi Secrets in Config and Outputs: Encryption Explained Store passwords and tokens safely with pulumi config set --secret, learn how secrets are encrypted in state, how they propagate through Outputs, and how to change the secrets provider.
  3. 17 Pulumi Config per Environment: Dev, Staging and Prod Design environment-specific Pulumi configuration: per-stack files, defaults in code, typed config objects, feature flags, copying configuration between stacks and avoiding drift between environments.
  4. 18 Pulumi ESC: Environments, Secrets and OIDC Credentials Learn Pulumi ESC (Environments, Secrets and Configuration): composable environments, imports, dynamic OIDC credentials for AWS, linking environments to stacks and using esc run.

Components and Reuse

  1. 19 Component Resources: Grouping Resources into Reusable Building Blocks Learn how Pulumi component resources group several resources into one logical unit: the constructor contract, parent options, registerOutputs, URNs and the resource tree.
  2. 20 Designing Component Inputs and Outputs: Input, Output and apply Design clean Pulumi component APIs: Input and Output types, defaults, secrets, apply and interpolate, avoiding unknown-value traps and exposing only what callers need.
  3. 21 Pulumi Packages and Multi-Language Components: Sharing Across Teams Share Pulumi components beyond one program: plain libraries, multi-language component packages, schemas, SDK generation, versioning and the Pulumi Registry.

State and Backends

  1. 22 Pulumi State: What Is Inside a Checkpoint and How Updates Use It Look inside Pulumi state: the checkpoint JSON, URNs, inputs vs outputs, dependencies, secrets and how pulumi up diffs desired state against recorded state.
  2. 23 Pulumi Backends and Login: Pulumi Cloud, Local Files and Object Storage Choose where Pulumi stores state: Pulumi Cloud, local files, or your own S3, Azure Blob or Google Cloud Storage bucket. Learn pulumi login, locking, migration and secrets providers.
  3. 24 Refresh and Drift: When the Cloud Changes Behind Pulumi's Back Understand configuration drift in Pulumi: how pulumi refresh and pulumi up --refresh reconcile state with the cloud, drift detection, ignoreChanges and handling manual edits.
  4. 25 Import and State Surgery: Adopting Resources and Fixing State Safely Bring existing cloud resources under Pulumi with pulumi import and the import option, then fix state with state delete, rename, move, protect and stack export or import.

Testing and Policy

  1. 26 Unit Testing Pulumi Programs with Mocks Unit test Pulumi infrastructure code without a cloud: pulumi.runtime.setMocks, newResource and call mocks, testing outputs, tags and security rules, and keeping tests fast.
  2. 27 Integration Testing and Ephemeral Stacks for Pulumi Test real infrastructure with Pulumi: ephemeral stacks per test run, the Automation API, polling and retries, guaranteed cleanup, cost control and when integration tests are worth it.
  3. 28 Policy as Code with Pulumi CrossGuard Enforce rules on Pulumi deployments with CrossGuard policy packs: resource and stack policies, enforcement levels, running locally, publishing to an organization and testing policies.

CI/CD and Operations

  1. 29 Pulumi in CI/CD Pipelines: GitHub Actions, OIDC and Safe Deploys Automate Pulumi deployments: preview on pull requests, up on merge, per-environment stacks, OIDC credentials instead of long-lived keys, caching dependencies and handling failures.
  2. 30 Previews, Pull Requests and Review Practices for Pulumi Read pulumi preview output with confidence: symbols, replace versus update, --diff, --json and plans. Learn what reviewers should check and how to gate risky deletes and replacements.
  3. 31 The Pulumi Automation API: Infrastructure as a Library Drive Pulumi from your own code with the Automation API: inline programs, LocalWorkspace, stack config, up, outputs, events, error handling and self-service platform patterns.
  4. 32 Safe Operations: Upgrades, Rollbacks and Day-2 Tasks in Pulumi Run Pulumi safely in production: provider and SDK upgrades, rolling back by redeploying, history, targeted updates, replace and delete options, cancelled updates and retiring stacks.

Projects and Practice

  1. 33 Project: A Static Website on Object Storage and a CDN with Pulumi Build a complete static website stack with Pulumi: private bucket, CDN with origin access control, HTTPS certificate, DNS, cache headers and content-type upload planning, with testable logic.
  2. 34 Project: A Three-Tier Web App on Containers with Pulumi Design a three-tier web application with Pulumi: VPC and subnets, load balancer, container service, managed database, security groups, secrets and sizing per environment, with testable network logic.
  3. 35 Project: A Multi-Environment Platform with Stack References Design a platform of Pulumi projects and environments: micro-stacks connected by stack references, per-environment config, promotion order, config consistency checks and a dependency-aware rollout.
  4. 36 Practice: Reviewing and Fixing Pulumi Programs Practice Pulumi skills: find bugs in flawed programs, write a small review linter, predict previews and work through incident drills on drift, locks, replacements and secrets.