pulumi-new
Create new Pulumi projects
TLDR
Choose a template interactively
Create a project from a specific template (e.g azure-python)
Create a project from a local file
Create a project from a Git repository
Use the specified secrets provider with the
SYNOPSIS
pulumi new [template] [flags]
PARAMETERS
--allow-secrets
Allow the use of secrets in the project.
--config-file
Load configuration from the specified file.
--description
The project's description; defaults to current directory name.
--dir
Create new project in the specified directory.
--force
Forces content to be created even if it may change or delete existing content.
--from-template
Use a template from a git repository or local path.
--generate-only
Generate the project only; do not create a stack or install dependencies.
--interactive [bool]
Enable interactive mode.
--name
The project's name; defaults to current directory name.
--offline
Do not attempt to download the template over the internet.
--secrets-provider
The type of provider that should be used to encrypt and decrypt secrets. Can be one of 'default', 'passphrase', 'awskms', 'azurekeyvault', 'gcpkms', or 'hashivault'.
--stack
The stack name to use for the new project.
--template
The template to use.
--yes
Skip confirmation prompts.
DESCRIPTION
The pulumi new
command is the primary entry point for creating new Pulumi projects. It allows you to bootstrap a project from a variety of templates, supporting multiple languages and cloud providers. When executed, it prompts the user to select a project template, provides options for customizing the project (e.g., project name, stack name, cloud provider), and then generates the necessary files based on the chosen template. This command significantly simplifies the initial setup of a Pulumi project, handling the boilerplate code and configurations, enabling developers to quickly start defining and deploying their infrastructure and applications. The generated files are then ready to be customized to fit the user's specific needs, allowing seamless integration with the Pulumi's infrastructure as code approach.
TEMPLATES
Pulumi provides a variety of templates for different languages (e.g., Python, Go, TypeScript, C#) and cloud providers (e.g., AWS, Azure, GCP, Kubernetes). The available templates can be listed by running `pulumi new` without specifying a template. You can also use custom templates by specifying a git repository or local path with the `--from-template` flag.
INTERACTIVE MODE
When running `pulumi new` without specifying a template and without `--yes`, Pulumi will enter interactive mode, guiding you through the process of selecting a template and configuring project settings.