Working with config stores

Config stores are a type of versionless container that allow you to store often repeated data as key-value pairs that can be read from the edge and shared by multiple Compute services in your account.

You can also create and work with config stores via the API.

Prerequisites

Config Store is only available for Fastly's Compute services, not for CDN (VCL-based) services.

Limitations and considerations

When creating or making changes to config stores, keep the following things in mind:

  • Config stores can only be used by Compute services, not CDN (VCL-based) services.
  • Trials for Compute include one config store with a maximum of 100 entries.
  • Paid accounts include a minimum of five config stores (each having a maximum of 500 entries).
  • Config store keys are limited to 255 characters and their values are limited to 8,000 characters.
  • Config stores and the names of keys and their values are case-sensitive.
WARNING

Personal information, secrets, or sensitive data should not be included in config stores or incorporated into edge logic. In addition, we do not maintain version histories of your config stores. Our Compliance and Law FAQ describes in detail how Fastly handles personal data privacy.

Creating a config store

Creating a config store requires you to create at least one key-value pair before you associate it with a service. To create a new config store and its key-value pairs, follow these steps:

  1. Log in to the Fastly web interface.
  2. Go to Resources > Config stores.
  3. Click Create a config store.
  4. In the Name of config store field, enter a name for the config store and then click Add.
  5. Click the Key-value pairs link.
  6. Click Add item.
  7. Enter the key and the value in the appropriate column and then click Add.
  8. Continue adding additional key-value pairs as necessary.

Linking config stores to a service

Once you've added at least one key-value pair to a config store, you can link it to a service from the Resources controls or from the service configuration for the service.

To link a config store to a service from the Resources controls:

  1. Log in to the Fastly web interface.
  2. Go to Resources > Config stores.

  3. Click Link to services to the right of the store you want to link.

  4. Select the checkbox next to any services you want to link your config store to.

  5. Click Next.

  6. Decide which version of the service to link to. By default, the system will assume you want to clone the most recently active version of your service. You can choose an existing draft version of the service instead by selecting it specifically from the Version menu.

  7. Select one of the following options for linking the store to your service:

    • Link only: links the store to the selected service versions but leaves any cloned or draft versions un-activated so you can activate them at a later time.
    • Link and activate: links the store to the selected service versions and activates those versions at the same time.

    A success message appears once the config store is linked to the service.

  8. Finally, do one of the following:

    • Click Activate versions to activate any cloned or draft versions of services linked to the config store.
    • Click Finish to leave the cloned or draft service versions un-activated so you can make additional configuration changes to them and activate them at a later time.

    You can immediately start referencing the config store in your edge logic.

To link a config store to a service from the service configuration:

  1. Log in to the Fastly web interface.
  2. From the Home page, select the appropriate service. You can use the search box to search by ID, name, or domain.
  3. Click Service configuration.
  4. From the Resources options in the on-page navigation, click Config stores.
  5. From the Link Config Store to service menu, select the config store you want to link to the service. A success message appears once the config store is linked to the service.

Once linked, you can immediately start referencing the config store in your edge logic and activate the service when you’re ready.

Unlinking config stores

You can unlink a config store from a service from the service configuration.

To unlink a config store:

  1. Log in to the Fastly web interface.
  2. From the Home page, select the appropriate service. You can use the search box to search by ID, name, or domain.
  3. Click Service configuration.
  4. From the Resources options in the on-page navigation, click Config stores.
  5. Click Unlink from service next to the config store you want to unlink from your service.
  6. Click Confirm and unlink. A new, draft version of the service is created.
  7. Activate the service to finalize unlinking the config store.

Editing a config store

You can edit the name of a config store as well as the key-value pairs within the store from Resources > Config stores. You can also access this page by clicking Edit in Resources when accessing a config store from the service configuration.

To rename a config store:

  1. Click the pencil Pencil icon to the right of the store you want to rename.
  2. Enter a new name for the config store.
  3. Click Save and then Confirm and rename to continue.

To add new key-value pairs to a config store:

  1. Expand the Key-value pairs section.
  2. Under Key-value pairs, click Add item.
  3. Enter the key and the value in the appropriate column and then click Add.
  4. Repeat for any additional key-value pairs.

To edit the key-value pairs within a config store:

  1. Expand the Key-value pairs section.
  2. Hover your cursor over the entry you want to edit, then click Edit.
  3. Edit the key or value as necessary.
  4. Click Save.

The changes you make will be immediately applied to your configuration including any deployed service versions associated with the config store.

Deleting a config store

You can delete a config store at any time. A config store must be unlinked from any services or an error will appear if you try to delete it.

Deleting a config store also deletes all key-value pairs within the store. If you have custom logic referencing these keys, ensure you update them before deleting the store.

To delete a config store:

  1. Log in to the Fastly web interface.
  2. Go to Resources > Config stores.
  3. Click the trash Trash icon to the right of the store you want to delete.
  4. Click Confirm and delete.
Was this guide helpful?

Do not use this form to send sensitive information. If you need assistance, contact support. This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.