Variable

Store and resolve variables and encrypted secrets

sfp server variable delete

Delete a variable (and any encrypted secret value) by key

USAGE
  $ sfp server variable delete -k <value> [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url
    <value>] [--environment <value>] [-g <value>...] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -e, --email=<value>               Email address for authenticated user. Ignored if --application-token is provided.
                                    Can be set via SFP_SERVER_USER env var.
  -g, --logsgroupsymbol=<value>...  Symbol used by CICD platform to group/collapse logs in the console. Provide an
                                    opening group, and an optional closing group symbol.
  -k, --key=<value>                 (required) Variable name to delete
  -t, --application-token=<value>   Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                    (CLI flags take precedence over env vars).
      --environment=<value>         Delete the environment-scoped variable for this environment instead of the
                                    project-scoped one
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --repository=<value>          The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
                                    for Azure DevOps
      --sfp-server-url=<value>      URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                    config:set server-url

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Delete a variable (and any encrypted secret value) by key

EXAMPLES
  $ sfp server variable delete --repository owner/repo --key POOL_NAME

  $ sfp server variable delete --repository owner/repo --key POOL_NAME --environment dev

sfp server variable get

Get a single variable by key (secret values are masked)

USAGE
  $ sfp server variable get -k <value> [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url
    <value>] [--environment <value>] [-g <value>...] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -e, --email=<value>               Email address for authenticated user. Ignored if --application-token is provided.
                                    Can be set via SFP_SERVER_USER env var.
  -g, --logsgroupsymbol=<value>...  Symbol used by CICD platform to group/collapse logs in the console. Provide an
                                    opening group, and an optional closing group symbol.
  -k, --key=<value>                 (required) Variable name to look up
  -t, --application-token=<value>   Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                    (CLI flags take precedence over env vars).
      --environment=<value>         Look up the environment-scoped variable for this environment instead of the
                                    project-scoped one
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --repository=<value>          The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
                                    for Azure DevOps
      --sfp-server-url=<value>      URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                    config:set server-url

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Get a single variable by key (secret values are masked)

EXAMPLES
  $ sfp server variable get --repository owner/repo --key POOL_NAME

  $ sfp server variable get --repository owner/repo --key POOL_NAME --environment dev

sfp server variable list

List variables for a project, or for a specific environment (secret values are masked)

USAGE
  $ sfp server variable list [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url <value>]
    [--environment <value>] [-g <value>...] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -e, --email=<value>               Email address for authenticated user. Ignored if --application-token is provided.
                                    Can be set via SFP_SERVER_USER env var.
  -g, --logsgroupsymbol=<value>...  Symbol used by CICD platform to group/collapse logs in the console. Provide an
                                    opening group, and an optional closing group symbol.
  -t, --application-token=<value>   Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                    (CLI flags take precedence over env vars).
      --environment=<value>         List environment-scoped variables for this environment instead of project-scoped
                                    variables
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --repository=<value>          The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
                                    for Azure DevOps
      --sfp-server-url=<value>      URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                    config:set server-url

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  List variables for a project, or for a specific environment (secret values are masked)

EXAMPLES
  $ sfp server variable list --repository owner/repo

  $ sfp server variable list --repository owner/repo --environment dev

  $ sfp server variable list --repository owner/repo --json

sfp server variable resolve

Preview the effective variables (and the SFP_VAR_/SFP_SECRET_ env) a workflow would receive for a project or environment, without running a workflow

USAGE
  $ sfp server variable resolve [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url <value>]
    [--environment <value>] [-g <value>...] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -e, --email=<value>               Email address for authenticated user. Ignored if --application-token is provided.
                                    Can be set via SFP_SERVER_USER env var.
  -g, --logsgroupsymbol=<value>...  Symbol used by CICD platform to group/collapse logs in the console. Provide an
                                    opening group, and an optional closing group symbol.
  -t, --application-token=<value>   Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                    (CLI flags take precedence over env vars).
      --environment=<value>         Resolve for this environment (environment values override project values); omit for
                                    project-only resolution
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --repository=<value>          The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
                                    for Azure DevOps
      --sfp-server-url=<value>      URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                    config:set server-url

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Preview the effective variables (and the SFP_VAR_/SFP_SECRET_ env) a workflow would receive for a project or
  environment, without running a workflow

EXAMPLES
  $ sfp server variable resolve --repository owner/repo

  $ sfp server variable resolve --repository owner/repo --environment dev

  $ sfp server variable resolve --repository owner/repo --environment dev --json

sfp server variable set

Create or update a project- or environment-scoped variable or secret

USAGE
  $ sfp server variable set -k <value> [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url
    <value>] [-v <value>] [-s] [--environment <value>] [-g <value>...] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -e, --email=<value>               Email address for authenticated user. Ignored if --application-token is provided.
                                    Can be set via SFP_SERVER_USER env var.
  -g, --logsgroupsymbol=<value>...  Symbol used by CICD platform to group/collapse logs in the console. Provide an
                                    opening group, and an optional closing group symbol.
  -k, --key=<value>                 (required) Variable name (uppercase letters, numbers and underscores, starting with
                                    a letter — e.g. POOL_NAME)
  -s, --secret                      Store the value as an encrypted secret (never returned by list/get, decrypted only
                                    at workflow runtime)
  -t, --application-token=<value>   Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                    (CLI flags take precedence over env vars).
  -v, --value=<value>               Variable value. For secrets this is the plaintext that is encrypted at rest
      --environment=<value>         Environment name for an environment-scoped variable. Omit for a project-scoped
                                    variable
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --repository=<value>          The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
                                    for Azure DevOps
      --sfp-server-url=<value>      URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                    config:set server-url

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Create or update a project- or environment-scoped variable or secret

EXAMPLES
  $ sfp server variable set --repository owner/repo --key POOL_NAME --value scratch_pool

  $ sfp server variable set --repository owner/repo --key NPM_TOKEN --value <token> --secret

  $ sfp server variable set --repository owner/repo --key POOL_NAME --value dev_pool --environment dev

  # Read a secret from stdin so it never enters shell history:

  $ sfp server variable set --repository owner/repo --key NPM_TOKEN --secret < token.txt

On this page