Files
infisical/docs/documentation/platform/folder.mdx
2023-10-04 10:25:54 +01:00

52 lines
2.1 KiB
Plaintext

---
title: "Folders"
description: "Organize your secrets with folders"
---
Infisical's folder feature lets you store secrets at a specific folder; we also call this **path-based secret storage**.
This is great for organizing secrets around hierarchies when multiple services, types of secrets, etc. are involved at great quantities.
With folders that can go infinitely deep, you can mirror your application architecture (be it microservices or monorepos)
or any logical grouping that best suits your needs.
Consider the following structure for a microservice architecture:
```
| service1
|---- envars
|---- users
|-------- tokens1
|-------- tokens2
| service2
|---- envars
...
```
In this example, we store environment variables for each microservice under each respective `/envars` folder.
We also store user-specific secrets for micro-service 1 under `/service1/users`. With this folder structure in place, your applications only need to specify a path like `/microservice1/envars` to fetch secrets from there.
By extending this example, you can see how path-based secret storage provides a versatile approach to manage secrets for any architecture.
## Folders
### Managing folders
To add a folder, press the downward chevron to the right of the **Add Secret** button; then press on the **Add Folder** button.
<Info>
Folder names can only contain alphabets, numbers, and dashes
</Info>
![add folder](../../images/platform/folder/folders-add.png)
To delete a folder, hover over it and press the **X** button that appears on the right side.
![delete folder](../../images/platform/folder/folders-delete.png)
### Comparing folders
It's possible to compare the contents of folders across environments in the **Secrets Overview** page.
When you click on a folder, the table will display the items within it across environments.
In the image below, you can see that the **Development** environment is the only one that contains items
in the `/users` folder, being other folders `/user-a`, `/user-b`, ... `/user-f`.
![comparing folders](../../images/platform/folder/folders-secrets-overview.png)