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 Deliver (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 Deliver (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 and click the Resources link.
  2. Click Create a config store.
  3. In the Name of config store field, enter a name for the config store and then click Add.
  4. Click the Key-value pairs link.
  5. Click Add item.
  6. Enter the key and the value in the appropriate column and then click Add.
  7. 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 tab or from the Service configuration tab for the service.

Linking config stores from the Resources tab

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

  1. Log in to the Fastly web interface and click the Resources link.
  2. Click Link to services to the right of the store you want to link.

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

  4. Click Next.

  5. 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.

  6. 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.

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

Linking config stores from the Service configuration tab

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

  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. You can also click Compute services or CDN services to access a list of services by type.
  3. From the Resources options in the sidebar, click Config stores.
  4. 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 tab.

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. You can also click Compute services or CDN services to access a list of services by type.
  3. From the Resources options in the sidebar, click Config stores.
  4. Click Unlink from service next to the config store you want to unlink from your service.
  5. Click Confirm and unlink. A new, draft version of the service is created.
  6. 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.

To rename a config store:

  1. Log in to the Fastly web interface and click the Resources link.
  2. Click the pencil to the right of the store you want to rename.
  3. Enter a new name for the config store.
  4. Click Save and then Confirm and rename to continue.
TIP

Be sure to update any custom logic with the new name of the object store.

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

  1. Log in to the Fastly web interface and click the Resources link.
  2. Expand the Key-value pairs section.
  3. Under Key-value pairs, click Add item.
  4. Enter the key and the value in the appropriate column and then click Add.
  5. Repeat for any additional key-value pairs.

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

  1. Log in to the Fastly web interface and click the Resources link.
  2. Expand the Key-value pairs section.
  3. Hover your cursor over the entry you want to edit, then click Edit.
  4. Edit the key or value as necessary.
  5. 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 and click the Resources link.
  2. Click the trash to the right of the store you want to delete.
  3. 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.