Pulumi quickstart
Quickstart your Pulumi experience by learning how to install Pulumi, set up your cloud credentials, and run your first update.
OS
Cloud
Language
Template
Install the Pulumi CLI
curl -fsSL https://get.pulumi.com | sh
brew install pulumi/tap/pulumi
choco install pulumi
Set up AWS credentials
Pulumi requires cloud credentials to manage and provision resources. Use an IAM user account that has programmatic access with rights to deploy and manage resources.
If you have previously installed and configured the AWS CLI, Pulumi will respect and use your configuration settings.
If you do not have the AWS CLI installed or plan on using Pulumi from within a CI/CD pipeline, retrieve your access key ID and secret access key and then set the
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
environment variables on your workstation.Set up Kubernetes credentials
Like
kubectl
, Pulumi will look for a kubeconfig file in the following locations:- The environment variable:
$KUBECONFIG
, - Or in current user’s default kubeconfig directory:
~/.kube/config
Verify the cluster is configured and up by running
kubectl get pods
.- The environment variable:
Create a directory and move into it
mkdir first-project && cd first-project
Use your first template
pulumi new aws-typescript
Pulumi projects and stacks organize Pulumi code. Projects are similar to GitHub repos and stacks are an instance of code with separate configuration. Projects can have multiple stacks for different development environments or for different cloud configurations.
The following files are generated when a new project is created:
Pulumi.yaml
defines the project.Pulumi.dev.yaml
contains configuration values for the stack you just initialized.program.cs
is the Pulumi program that defines your stack resources.
Pulumi.yaml
defines the project.Pulumi.dev.yaml
contains configuration values for the stack you just initialized.main.go
is the Pulumi program that defines your stack resources.
Pulumi.yaml
defines the project.Pulumi.dev.yaml
contains configuration values for the stack you just initialized.src/main/java/myproject
defines the project’s Java package root.app.java
is the Pulumi program that defines your stack resources.
Pulumi.yaml
defines the project.Pulumi.dev.yaml
contains configuration values for the stack you just initialized.main.py
is the Pulumi program that defines your stack resources.
Pulumi.yaml
defines the project.Pulumi.dev.yaml
contains configuration values for the stack you just initialized.index.ts
is the Pulumi program that defines your stack resources.
Pulumi.yaml
defines the project.Pulumi.dev.yaml
contains configuration values for the stack you just initialized.
pulumi new
uses a template to quickly deploy and modify common architectures.Deploy your infrastructure!
pulumi up
Pulumi evaluates the program and determines what resources need updates. By default pulumi runs a preview that outline the changes that will be made when you run the deployment. Pulumi computes the minimally disruptive change to achieve the desired state described by the program.
Learn more
Learn how to modify a program with Pulumi’s Get started tutorial for AWS.
Learn more
Learn how to modify a program with Pulumi’s Get started tutorial for Azure.
Learn more
Learn how to modify a program with Pulumi’s Get started tutorial for Google Cloud.
Learn more
Learn how to modify a program with Pulumi’s Get started tutorial for Kubernetes.
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.