YAML Config file¶
In the previous version of the Routes Management feature, you could only use Route builder for setting up routes, we decided to improve this experience by adding a new routes provisioning system that uses config files. This will make VGS more natural as routes can be defined via files that can be promoted from sandbox to live vaults and version controlled.
YAML feature currently allows to view, export and import the routes configuration in YAML format, that is considered a natural superset of JSON, offering improved human readability and a more complete information model.
Viewing and Exporting Route Configurations¶
To view route configuration in YAML format, click “Manage” next to the route you would like to explore.
After clicking “Manage”, you will see the following screen with route settings.
Now, clicking on “View YAML”, a modal showing the route configuration will pop up. Next, click “Export” to export it.
Once saved, you can check the route configuration locally and use it to promote your route from sandbox to live.
Creating and Promoting Routes¶
To create or promote existing route, go to the Routes page, click on “Add Route” and choose “Import from YAML” from the drop-down menu.
Next, select YAML file from your local filesystem.
Once selected, click “Open”.
When you import route configuration, the dashboard will check whether the chosen route already exists. If there is no route with such route id, the new one will be created and a corresponding notification about successful creation will show up.
If such route already exists, you will see a warning message asking whether you are sure you would like to update existing route.
By pressing “Update” you agree to update the route and the notification will state that your route was just updated.
Note. Promoting routes via YAML feature allows you to overwrite existing routes configurations which leads to problems if you don’t pay attention to a route id. Be careful when re-using route configurations in live vaults.
It’s possible to make changes to a created route on the Dashboard, but there’s currently no possibility to save the changes back to the previous version automatically. However, when you make changes to a route, you can export the route YAML config file to your local filesystem which will bring up a Cannot save route version. Here available option will help you synchronize your route changes back to the needed version, if required.