octopus tenant variables update

Update the value of a tenant variable in Octopus Deploy

Usage:
  octopus tenant variables update [flags]

Flags:
      --environment strings           Assign environment scopes to the variable. Multiple scopes can be supplied.
  -l, --library-variable-set string   The library variable set
  -n, --name string                   The name of the variable
  -p, --project string                The project
  -t, --tenant string                 The tenant
      --value string                  The value to set on the variable


Global Flags:
  -h, --help                   Show help for a command
      --no-prompt              Disable prompting in interactive mode
  -f, --output-format string   Specify the output format for a command ("json", "table", or "basic") (default "table")
  -s, --space string           Specify the space for operations

Examples

Octopus Samples instance

Many of the examples we use, reference the samples instance of Octopus Deploy. If you’d like to explore the samples instance, you can log in as a guest.

# Interactive mode - prompts for all required values
$ octopus tenant variables update

# Update a project variable for a specific environment (single environment scope)
$ octopus tenant variables update --tenant "Bobs Fish Shack" --name "site-name" --value "Bob's Fish Shack" --project "Awesome Web Site" --environment "Test"

# Update a project variable for multiple environments (multiple environment scopes)
$ octopus tenant variables update --tenant "Bobs Fish Shack" --name "database-server" --value "prod-db-01" --project "Awesome Web Site" --environment "Staging" --environment "Production"

# Update a project variable for all environments (unscoped - omit --environment flag)
$ octopus tenant variables update --tenant "Bobs Fish Shack" --name "app-name" --value "Bobs App" --project "Awesome Web Site"

# Update a common variable from a library variable set
$ octopus tenant variables update --tenant "Sally's Tackle Truck" --name "dbPassword" --value "12345" --library-variable-set "Shared Variables"

# Update a common variable with environment scoping
$ octopus tenant variables update --tenant "Sally's Tackle Truck" --name "api-key" --value "prod-key-123" --library-variable-set "API Config" --environment "Production"

Learn more

Help us continuously improve

Please let us know if you have any feedback about this page.

Send feedback

Page updated on Tuesday, January 20, 2026