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. yaml-import

After clicking “Manage”, you will see the following screen with route settings. yaml-import

Now, clicking on “View YAML”, a modal showing the route configuration will pop up. Next, click “Export” to export it. yaml-import

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. yaml-import

Next, select YAML file from your local filesystem. yaml-import

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. yaml-import

If such route already exists, you will see a warning message asking whether you are sure you would like to update existing route. yaml-import

By pressing “Update” you agree to update the route and the notification will state that your route was just updated. yaml-import

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.

Routes Versioning

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.

Routes tagging

To help you manage your routes more effectively, assign your own metadata to each route in the form of tags. A tag is a label that you assign to a route. Tags enable you to categorize your routes in different ways, for example, by purpose, owner, or environment. This is useful when you have many routes of the same type — you can quickly identify a specific route based on the tags you’ve assigned to it. For example, you can define a set of tags for your live routes that send traffic to Stripe. How to set up a tag

Via Dashboard

  • Go to specific route and view YAML
  • Export YAML
  • Find tags field and add new tag. Ex. tags: {"name": "This is cool name"}
  • Import route from YAML file

Via CLI

  • dump-all route command
  • edit tags for one or few routes in the file
  • sync-all route command with the file
  • dump-all routes again to see that tags were saved

Tag restrictions

  • maximum amount of tags - 5
  • maximum length of key and value can’t be more then 150 characters