Skip to content

Read infisical API URL from infisical.json #206

@gee-forr

Description

@gee-forr

Feature description

It would be amazing if the infisical API URL could be defined as a static value in a project's .infisical.json file in addition to having it defined as an env var, or CLI flag.

Why would it be useful?

When using the self hosted infisical, this value needs to be set, else any infisical commands will run against the main cloud hosted version.

This value never changes (assuming you remain on your instance), so it makes sense to be able to set its value in the same place that other static project configuration lives.

Additionally, it will simplify CI setup that requires setting the INFISICAL_API_URL env var, which is sometimes overlooked, and leads to hard-to-debug 401 errors that do not state the server's name that is returning the 401.

Additional context

This is an example of what I hope to be able to specify in a project's .infisical.json:

{
  "workspaceId":                   "ea1b0a5f-xxxx-xxxx-xxxx-a1ef1c323cc1",
  "defaultEnvironment":            "dev",
  "gitBranchToEnvironmentMapping": null,
  "apiUrl":                        "https://my.infisical.instance.com"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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