2021-02-03 09:30:42 -06:00
---
2023-05-15 15:25:28 -07:00
title_tag: Project File Reference
2022-03-25 16:05:40 +00:00
meta_desc: Documentation of the settings that are valid for the Pulumi project file.
2023-05-15 15:25:28 -07:00
title: Project file
h1: Pulumi project file
2023-06-08 16:15:52 -07:00
meta_image: /images/docs/meta-images/docs-meta.png
2021-02-03 09:30:42 -06:00
menu:
2023-05-15 15:25:28 -07:00
concepts:
parent: projects
weight: 1
2023-02-10 12:20:48 -08:00
aliases:
2023-05-15 15:25:28 -07:00
- /docs/reference/pulumi-yaml/
- /docs/reference/project-file/
2021-02-03 09:30:42 -06:00
---
2022-08-16 10:26:24 -07:00
The `Pulumi.yaml` project file specifies metadata about your project, such as the project name and language runtime for your project.
2021-02-03 09:30:42 -06:00
2022-08-16 10:26:24 -07:00
## Example project files
2021-02-03 09:30:42 -06:00
2022-08-16 10:26:24 -07:00
### Example project file with only required attributes
2021-02-03 09:30:42 -06:00
2022-08-16 10:26:24 -07:00
```yaml
2022-12-11 17:54:32 +01:00
name: Example Pulumi project file with only required attributes
2022-08-16 10:26:24 -07:00
runtime: nodejs
```
2021-02-03 09:30:42 -06:00
2022-08-16 10:26:24 -07:00
### Example project file with all possible attributes
2021-02-03 09:30:42 -06:00
2022-08-16 10:26:24 -07:00
```yaml
2022-12-11 17:54:32 +01:00
name: Example Pulumi project file with all possible attributes
2022-08-16 10:26:24 -07:00
runtime: yaml
2023-03-17 03:58:56 +05:30
description: An example project with all attributes
2022-08-16 10:26:24 -07:00
main: example-project/
stackConfigDir: config/
backend:
url: https://pulumi.example.com
options:
2022-10-03 04:26:17 -07:00
refresh: always
2022-08-16 10:26:24 -07:00
template:
description: An example template
config:
aws:region:
description: The AWS region to deploy into
default: us-east-1
secret: true
plugins:
providers:
2023-05-30 15:59:35 +01:00
- name: aws
path: ../../bin
2022-08-16 10:26:24 -07:00
languages:
2023-05-30 15:59:35 +01:00
- name: yaml
path: ../../../pulumi-yaml/bin
version: 1.2.3
2022-08-16 10:26:24 -07:00
```
2021-02-03 09:30:42 -06:00
2022-08-16 10:26:24 -07:00
## Attributes
2022-03-25 16:05:40 +00:00
2022-08-16 10:26:24 -07:00
### All attributes
2021-02-03 09:30:42 -06:00
2022-08-16 10:26:24 -07:00
| Name | Required | Description | Options |
| - | - | - | - |
| `name` | required | Name of the project containing alphanumeric characters, hyphens, underscores, and periods. | None. |
| `runtime` | required | Installed language runtime of the project: `nodejs` , `python` , `go` , `dotnet` , `java` or `yaml` . | [runtime options ](#runtime-options )
2023-03-17 03:58:56 +05:30
| `description` | optional | A brief description of the project. | None. |
2022-11-01 10:16:36 +00:00
| `config` | optional | Project level config (Added in v3.44). | [config options ](#config-options ) |
2022-08-16 10:26:24 -07:00
| `main` | optional | Path to the Pulumi program. The default is the working directory. | None. |
| `stackConfigDir` | optional | Config directory location relative to the location of `Pulumi.yaml` . | None. |
2023-05-15 15:25:28 -07:00
| `backend` | optional | [Backend ](/docs/concepts/state/ ) of the project. | [backend options ](#backend-options ) |
2022-08-16 10:26:24 -07:00
| `options` | optional | Additional project options. | [options options ](#options-options ) |
| `template` | optional | Config to be used when creating new stacks in the project. | [template options ](#template-options ) |
| `plugins` | optional | Override for the plugin selection. Intended for use in developing pulumi plugins. | [plugins options ](#plugins-options ) |
2021-02-03 09:30:42 -06:00
2022-08-16 10:26:24 -07:00
### `runtime` options
2021-11-11 11:16:17 -08:00
2022-08-16 10:26:24 -07:00
The runtime attribute has an additional property called options where you can further specify runtime configuration.
2022-07-28 09:28:33 +01:00
2022-08-16 10:26:24 -07:00
| Name | Use case | Description |
| - | - | - |
2023-03-17 03:58:56 +05:30
| `typescript` | Only applicable for the **nodejs** runtime | Boolean indicating whether to use `ts-node` or not. |
| `nodeargs` | Only applicable for the **nodejs** runtime | Arguments to pass to `node` . |
| `buildTarget` | Only applicable for the **go** runtime | Path to save the compiled go binary to. |
| `binary` | Applicable for the **go** , ** .net**, and **java** runtimes | Path to pre-built executable. |
| `virtualenv` | Ony applicable for the **python** runtime | Virtual environment path. |
| `compiler` | Only applicable for **YAML** projects | Executable and arguments issued to standard out. |
2022-08-16 10:26:24 -07:00
2022-09-09 07:00:53 -07:00
#### About `nodeargs`
Arguments specified here are passed to `node` when running the Pulumi program. For example, `nodeargs: "--trace-warnings"` will result in `node` being invoked as `node --trace-warnings` .
2022-10-03 09:52:53 -05:00
#### About `buildTarget`
- For Go
- If specified, go sources in `$CWD` will be compiled via `go build` to the specified path before being run.
- If unspecified, go sources in `$CWD` will be compiled via `go build` to a temporary executable that is deleted after running.
- Cannot be specified with the `binary` runtime option.
2022-08-16 10:26:24 -07:00
#### About `binary`
2022-10-03 09:52:53 -05:00
- For Go, cannot be specified with the `buildTarget` runtime option.
2022-08-16 10:26:24 -07:00
- For .NET, if not specified, a .NET project in `$CWD` will be invoked via `dotnet run` .
#### About `virtualenv`
New Python projects created with `pulumi new` have this option set by default. If not specified, Pulumi will invoke the `python3` command it finds on `$PATH` (falling back to `python` ) to run the Python program. To use a virtual environment without the `virtualenv` option, run `pulumi` commands (such as `pulumi up` ) from an activated virtual environment shell. Or, if using a tool like [Pipenv ](https://github.com/pypa/pipenv ), prefix `pulumi` commands with `pipenv run pulumi ...` .
2022-11-01 10:16:36 +00:00
### `config` options
`config` is a map of config property keys to either values or structured declarations.
Non-object values are allowed to be set directly. Anything more complex must be defined using the structured
schema declaration, or the nested value declaration both shown below.
#### Values
| Name | Required | Description |
| - | - | - |
| `value` | required | The value of this configuration property. |
#### Schemas
Schemas are only valid for project property keys. For setting the value of a provider configuration either use a direct value, or the nested value declaration shown above.
| Name | Required | Description |
| - | - | - |
| `type` | required | The type of this config property, either `string` , `boolean` , `integer` , or `array` . |
| `description` | optional | A description for this config property. |
| `secret` | optional | True if this config property should be a secure secret value. |
| `default` | optional | The default value for this config property, must match the given type. |
| `items` | required if `type` is `array` | A nested structured declaration of the type of the items in the array. |
2022-09-02 22:08:40 +01:00
### `backend` options
| Name | Required | Description |
| - | - | - |
| `url` | optional | URL is optional field to explicitly set backend url. |
2022-08-16 10:26:24 -07:00
### `options` options
2022-09-22 13:09:25 -07:00
| Name | Required | Description |
| - | - | - |
| `refresh` | optional | Set to `always` to refresh the state before performing a Pulumi operation. |
2022-08-16 10:26:24 -07:00
### `template` options
| Name | Required | Description |
| - | - | - |
| `description` | optional | Description of the template. |
2022-09-07 20:08:11 -07:00
| `config` | required | Config to request when using this template with `pulumi new` . |
2022-08-16 10:26:24 -07:00
2023-03-17 15:08:19 -06:00
#### `config`
2022-08-16 10:26:24 -07:00
| Name | Required | Description |
| - | - | - |
| `description` | optional | Description of the config. |
| `default` | optional | Default value of the config. |
| `secret` | optional | Boolean indicating if the configuration is labeled as a secret. |
### `plugins` options
Use this option to link to local plugin binaries. This option is intended for use in developing pulumi plugins.
| Name | Required | Description |
| - | - | - |
2023-05-30 15:59:35 +01:00
| `providers` | optional | List of provider plugins. |
| `analyzers` | optional | List of policy plugins. |
| `languages` | optional | List of language plugins. |
2022-08-16 10:26:24 -07:00
#### Options for `providers`, `analyzers`, and `languages`
| Name | Required | Description |
| - | - | - |
| `name` | required | Name of the plugin. |
| `path` | optional | Path to the plugin folder. |
| `version` | optional | Version of the plugin, if not set, will match any version the engine requests. |
### Deprecated attributes
| Name | Required | Description |
| - | - | - |
| `config` | optional | Config directory relative to the location of `Pulumi.yaml` . |