This repository contains examples of using Pulumi to build and deploy cloud applications and infrastructure.
Each example has a two-part prefix, <cloud>-<language>
, to indicate which <cloud>
and <language>
it pertains to.
The cloud is one of aws
(for Amazon Web Services), azure
(for Microsoft
Azure), gcp
(for Google Cloud
Platform), kubernetes
(for
Kubernetes), or cloud
(for
Pulumi's cross-cloud programming framework).
See the Pulumi documentation for more details on getting started with Pulumi.
This is one of our most basic examples, showing how to provision a simple Linux webserver serving traffic on port 80. This example is available in multiple flavors:
- AWS EC2 instance in JavaScript
- AWS EC2 instance in Python
- Azure Virtual Machine in JavaScript
- Kubernetes Nginx in Python
An extension of this example demonstrates creating a minimal component that encapsulates creating EC2 instances, highlighting one of the benefits of using general purpose languages for managing infrastructure.
This example demonstrates a complete URL shortener web application using high-level cloud.Table
and
cloud.HttpEndpoint
components, highlighting the ability to combine deployment time and runtime code, and the simple,
cloud-agnostic, programming model of @pulumi/cloud
. Although we only support AWS today in this framework, our plan
is to offer an implementation of this on all major clouds, and so any code targeting this can truly run anywhere.
An extension of this example adds a reusable cache component to the URL shortener
using cloud.Service
to run a containerized Redis image. This shows that you can create your own cloud.*
-like
abstractions for your own use, your team's, or to share with the community using your language's package manager.
This example features an end-to-end pipeline for generating keyframe thumbnails from videos uploaded to a bucket using
containerized FFmpeg. It combines containers, serverless functions, and cloud storage into
a single 40-line application using @pulumi/cloud-aws
.
This example deploys a complete serverless C# application using raw aws.apigateway.RestAPI
, aws.lambda.Function
and
aws.dynamodb.Table
resources from @pulumi/aws
. Although this doesn't feature any of the higher-level abstractions
from the @pulumi/cloud
package, it demonstrates that you can program the raw resources directly available in AWS
to accomplish all of the same things this higher-level package offers.
The deployed Lambda function is a simple C# application, highlighting the ability to manage existing application code in a Pulumi application, even if your Pulumi code is written in a different language like JavaScript or Python.
This examples shows a version of the Kubernetes
Guestbook app using Pulumi and
@pulumi/kubernetes
.
This example deploys a static website to AWS S3, demonstrating how to combine infrastructure code and content in the same application.
A simple voting app that uses Redis for a data store and a Python Flask app for the frontend, demonstrating the high-level framework @pulumi/cloud
.