Skip to content

Error "Project ID is required when using machine identity" with workspaceId defined in .infiscal.json #284

Description

@dokterbob

With the following .infisical.json:

{
    "workspaceId": "<REDACTED>",
    "defaultEnvironment": "dev",
    "gitBranchToEnvironmentMapping": null,
    "domain": "https://eu.infisical.com"
}

The following deploy script:

INFISICAL_TOKEN=$($INFISICAL_CLI login --method=universal-auth --silent --plain)
export INFISICAL_TOKEN

exec $INFISICAL_CLI run --silent "$@" -- <REDACTED>

Results in:

Warning: Using domain 'https://eu.infisical.com' from .infisical.json; all requests and credentials will be sent there. 
Warning: Using domain 'https://eu.infisical.com' from .infisical.json; all requests and credentials will be sent there. 
Project ID is required when using machine identity

Considering that domain is correctly read and that workspaceId is defined in the same file, I would expect not to have to set the project id explicitly.

I have confirmed that the error stems from infisical run. I have confirmed that passing--projectId=<REDACTED> runs my command correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions