Program the Cloud
Pulumi provides a cloud native programming model to create containers, serverless functions, and cloud infrastructure, with all the benefits of immutable infrastructure, and real programming languages.
Get Started Learn More// Deploy a custom container image based on nginx
import * as cloud from "@pulumi/cloud";
let nginx = new cloud.Service("nginx", {
build: ".",
ports: [{ port: 80 }],
replicas: 2,
});
export let url = nginx.defaultEndpoint;
// Create a serverless REST API
import * as cloud from "@pulumi/cloud";
let app = new cloud.API("my-app");
app.static("/", "www");
// Serve a simple REST API on `GET /hello`:
app.get("/hello", (req, res) =>
res.json({ hello: "World!" }));
export let url = app.publish().url;
// Create a simple web server
const aws = require("@pulumi/aws");
let size = "t2.micro";
let ami = "ami-7172b611"
let server = new aws.ec2.Instance("web-server-www", {
tags: { "Name": "web-server-www" },
instanceType: size,
securityGroups: [ group.name ],
ami: ami,
userData: userData
});
exports.publicIp = server.publicIp;
exports.publicHostName = server.publicDns;
// Deploy 3 replicas of an nginx pod
import * as k8s from "@pulumi/kubernetes";
function deploy(name, replicas, pod) {
return new k8s.apps.v1beta1.Deployment(name, {
spec: {
selector: { matchLabels: pod.metadata.labels },
replicas: replicas,
template: pod
}
});
}
const nginxServer = deploy("nginx", 3, {
metadata: { labels: { app: "nginx" } },
spec: {
containers: [{ name: "nginx",
image: "nginx:1.15-alpine" }]
}
});
Your Code. Your Cloud. Your Team.
Unify development and devops practices to define, deploy, and manage cloud apps and infrastructure
Your Code.
Maximize your productivity by defining cloud apps and resources as code in familiar languages.
Learn MoreYour Cloud.
Deploy cloud apps and infrastructure anywhere. Eliminate cloud specific DSLs to simplify multi cloud management.
Learn MoreYour Team.
Make use of preferred practices to deliver cloud native apps and infrastructure with enterprise-grade workflows.
Learn MoreWhat They're Saying
We're excited to see Pulumi deliver a pure code multi-cloud cloud programming model. Combined with IOpipe, teams can deploy, test, and debug their code faster.
Erica Windisch, Co-founder and CTO
IOpipe
With Pulumi, we have the tools to achieve a unified DevOps model. We retired 25,000 lines of complex config and replaced it with 100s of lines of real code with Pulumi.
Kim Hamilton, CTO
Learning Machine
