Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: update README to clarify secret referencing syntax and add cros…
…s-application reference example
  • Loading branch information
nimish-ks committed Mar 28, 2025
commit bdbb5fa434737fd8a338c9bc227ab05652349608
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ The Phase Secrets SDK provides a Go package for managing secrets in your applica

### Secret Referencing Syntax

| Reference Syntax | Environment | Path | Secret Key | Description |
|-----------------------------------|------------------|-----------------------------------|------------------------|-------------------------------------------------------------|
| `${KEY}` | Same environment | `/` | KEY | Local reference in the same environment and root path (/). |
| `${staging.DEBUG}` | `staging` | `/` (root of staging environment) | DEBUG | Cross-environment reference to a secret at the root (/). |
| `${prod./frontend/SECRET_KEY}` | `prod` | `/frontend/` | SECRET_KEY | Cross-environment reference to a secret in a specific path. |
| `${/backend/payments/STRIPE_KEY}` | Same environment | `/backend/payments/` | STRIPE_KEY | Local reference with a specified path. |
| Reference Syntax | Application | Environment | Path | Secret Key | Description |
|-------------------------------------------|------------------|------------------|-----------------------------------|------------------------|-------------------------------------------------------------|
| `${KEY}` | Same application | Same environment | `/` | KEY | Local reference in the same environment and root path (/). |
| `${staging.DEBUG}` | Same application | `staging` | `/` (root of staging environment) | DEBUG | Cross-environment reference to a secret at the root (/). |
| `${prod./frontend/SECRET_KEY}` | Same application | `prod` | `/frontend/` | SECRET_KEY | Cross-environment reference to a secret in a specific path. |
| `${/backend/payments/STRIPE_KEY}` | Same application | Same environment | `/backend/payments/` | STRIPE_KEY | Local reference with a specified path. |
| `${backend_api::production./frontend/KEY}` | `backend_api` | `production` | `/frontend/` | KEY | Cross-application reference to a secret in a specific path. |

## Installation

Expand Down