Skip to Content
Octopus Energy Packages

Multiple environments

Route secrets by environment using a single interpolation

Use this pattern when each environment has its own 1Password item in the same vault.

Configure 1Password

Create one item per environment in your vault, named with the lowercase environment label (matching APP_ENV):

APP_ENV1Password item
developmentProject development
previewProject preview
productionProject production

Each item holds fields for every secret the schema references (e.g. SECRET).

Write the schema

Interpolate APP_ENV directly into the 1Password reference:

SECRET=op("op://Vault/Project ${APP_ENV}/SECRET")

Sync to your targets

pnpm oe.env sync

Varlock resolves the value separately for each target environment.

On this page