What changed
The CLI is moving away from.infisical.json. It now reads project settings from .infisical.yaml. The CLI still reads .infisical.json for now, but a future release will stop reading it.
Who is affected
You’re affected if you use an.infisical.json file anywhere, including:
- Repositories with a committed
.infisical.json - Container images that copy
.infisical.jsoninto the image
Prerequisites
- Infisical CLI 0.43.145 or later on every machine that reads the file, including developer machines, CI pipelines, and container images (upgrade the CLI)
.infisical.yaml, so after you delete .infisical.json, those versions can’t find the project linked to the directory.
Migration steps
Convert the file with theinfisical migrate-config command, or edit it by hand.
- Run migrate-config
- Edit the file by hand
1
In the directory that holds The command copies every setting from
.infisical.json, run:.infisical.json into a new .infisical.yaml in the same directory, deletes .infisical.json, and prints the paths of both files:2
Commit the new file and the deletion of the old one:
.infisical.json, such as one per package in a monorepo, run the command in each directory that holds one..infisical.json by name, such as in a COPY instruction, change it to .infisical.yaml.
Verify the migration
In the directory that holds.infisical.yaml, run a command that reads the file, such as:
.infisical.yaml with the field mapping.
FAQ
What if .infisical.json and .infisical.yaml are in the same directory?
What if .infisical.json and .infisical.yaml are in the same directory?
The CLI can read both
.infisical.yaml and .infisical.json. But
.infisical.yaml takes precedenceCan I run infisical init instead of migrate-config?
Can I run infisical init instead of migrate-config?
infisical init writes a new .infisical.yaml that holds only the project
ID, so you lose the environment, branch mapping, folder, and instance
settings from .infisical.json. To keep those settings, run infisical migrate-config.How do I hide the deprecation notice?
How do I hide the deprecation notice?
Set the
INFISICAL_DISABLE_WORKSPACE_CONFIG_MIGRATION_NOTICE environment
variable to any value, such as true. The CLI prints the notice at most
once a day and writes it to standard error, so the notice doesn’t change the
output of commands like infisical export.