Prompted Variables

Last updated

As you work with variables in Octopus, there may be times when the value of a variable isn't known and you need a user to enter the variable at deployment time. Octopus can handle this using Prompted variables.

Defining a Prompted Variable

To make a variable a prompted variable, you need to enter the variable editor when you are creating or editing the variable. On any of the variable fields, click OPEN EDITOR:

Open Variable Editor

When defining a prompted variable, you can provide a friendly name and description, and specify if the value is required. A required variable must be supplied when the deployment is created and must not be empty or white space.

Prompted Variable

You can identify prompted variables by looking for the icon next to the value:

Providing a Value For the Variable

When deploying (not creating a release), you'll be prompted to provide a value for the variable:

Required prompted variable

A value can also be passed to a prompted variable when using Octo.exe through the --variable parameter of the Create-Release or Deploy-Release commands

octo.exe create-release ... --variable "Missile launch code:LAUNCH123" --variable "Variable 2:Some value"

Prompted variables can be combined with sensitive variables. They will appear with a password box when creating the deployment.