---
title: pulumi config set | CLI commands
url: /docs/iac/cli/commands/pulumi_config_set/
---

Set configuration value

## Synopsis

Configuration values can be accessed when a stack is being deployed and used to configure behavior. 
If a value is not present on the command line, pulumi will prompt for the value. Multi-line values
may be set by piping a file to standard in.

The `--path` flag can be used to set a value inside a map or list:

  - `pulumi config set --path 'names[0]' a` will set the value to a list with the first item `a`.
  - `pulumi config set --path parent.nested value` will set the value of `parent` to a map `nested: value`.
  - `pulumi config set --path '["parent.name"]["nested.name"]' value` will set the value of 
`parent.name` to a map `nested.name: value`.

When setting the config for a path, "true" and "false" are treated as boolean values, and
integers are treated as numbers. All other values are treated as strings.  Top level entries
are always treated as strings.

```
pulumi config set <key> [flags] [--] [value]
```

## Options

```
  -h, --help          help for set
      --path          The key contains a path to a property in a map or list to set
      --plaintext     Save the value as plaintext (unencrypted)
      --secret        Encrypt the value instead of storing it in plaintext
      --type string   Save the value as the given type.  Allowed values are string, bool, int, and float
```

## Options inherited from parent commands

```
      --color string                 Colorize output. Choices are: always, never, raw, auto (default "auto")
      --config-file string           Use the configuration values in the specified file rather than detecting the file name
  -C, --cwd string                   Run pulumi as if it had been started in another directory
      --disable-integrity-checking   Disable integrity checking of checkpoint files
  -e, --emoji                        Enable emojis in the output
  -Q, --fully-qualify-stack-names    Show fully-qualified stack names
      --logflow                      Flow log settings to child processes (like plugins)
      --logtostderr                  Log to stderr instead of to files
      --memprofilerate int           Enable more precise (and expensive) memory allocation profiles by setting runtime.MemProfileRate
      --non-interactive              Disable interactive mode for all commands
      --otel-traces string           Export OpenTelemetry traces to the specified endpoint. Use file:// for local JSON files, grpc:// for remote collectors
      --profiling string             Emit CPU and memory profiles and an execution trace to '[filename].[pid].{cpu,mem,trace}', respectively
  -s, --stack string                 The name of the stack to operate on. Defaults to the current stack
      --tracing file:                Emit tracing to the specified endpoint. Use the file: scheme to write tracing data to a local file
  -v, --verbose int                  Enable verbose logging (e.g., v=3); anything >3 is very verbose
```

## SEE ALSO

* [pulumi config](/docs/iac/cli/commands/pulumi_config/)	 - Manage configuration


