Working with config stores
Last updated 2023-02-22
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@Edge services in your account.
You can also create and work with config stores via the API.
IMPORTANT
This feature is part of a limited availability release. To learn more, contact your account manager or email sales@fastly.com.
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.
- Free trials for Compute@Edge include one config store with a maximum of 100 entries.
- Paid accounts include up to five config stores with a maximum of 500 entries per store.
- Config store keys are limited to 256 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
Create a config store from the Resources tab. Then, add key-value pairs to the store.
To create a new config store:
- Log in to the Fastly web interface and click the Resources link.
- Click the Create a config store button.
- Enter a name for the config store.
- Click the Add button.
- Under Key-value pairs, click Add item. A row appears where you can add key-value pairs.
- Enter the key and the value in the appropriate column and then click the Add button.
- Repeat for any additional key-value pairs.
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:
- Log in to the Fastly web interface and click the Resources link.
- Click the Link to services button to the right of the store you want to link. A list of your services appears.
- Select the checkbox next to any services you want to link your config store to.
- Click the Next button.
- Use the Version menu for each service to select the service version to add your config store to. You can select an existing draft version or elect to clone the current active version.
- To complete linking, select one of the following options:
- Link only: links the config store to the selected service versions.
- Link and activate: links the config store to the selected service versions and activates those versions.
A success message appears once the config store is linked to the service. You can immediately start referencing the config store in your edge logic. If you selected Link only, you must activate the service when you’re ready for the logic to work.
Linking config stores from the Service configuration tab
To link a config store to a service from the Service configuration tab:
- Log in to the Fastly web interface.
- From the Home page, select the appropriate service. You can use the search box to search by ID, name, or domain.
- Click the Edit configuration button and then select the option to clone the active version. The Domains page appears.
- Click the Config stores link under Resources. The Config stores page appears.
- 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. You can immediately start referencing the config store in your edge logic and activate the service when you’re ready.
Unlinking config stores
To unlink a service from the Resources tab:
- Log in to the Fastly web interface and click the Resources link.
- Expand the Services section.
- Click the Unlink link next to the service you want to unlink from.
- Click Confirm and unlink.
Unlinking a service from the Resources tab creates a new draft version of the service. To finalize unlinking the config store from the service, you must activate the service.
To unlink a service the Service configuration tab:
- Log in to the Fastly web interface.
- From the Home page, select the appropriate service. You can use the search box to search by ID, name, or domain.
- Click the Edit configuration button and then select the option to clone the active version. The Domains page appears.
- Click the Config stores link under Resources. The Config stores page appears.
- Click the Unlink from service button next to the config store you want to unlink from your service.
- Click Confirm and unlink.
- 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:
- Log in to the Fastly web interface and click the Resources link.
- Click the pencil icon to the right of the store you want to rename.
- Enter a new name for the config store.
- Click the Save button.
- A window appears asking to confirm you want to rename the store. Click Confirm and rename to continue.
Be sure to update any custom logic with the new name of the config store.
To add new key-value pairs to a config store:
- Log in to the Fastly web interface and click the Resources link.
- Expand the Key-value pairs section.
- Under Key-value pairs, click Add item. A row appears where you can add key-value pairs.
- Enter the key and the value in the appropriate column and then click the Add button.
- Repeat for any additional key-value pairs.
To edit the key-value pairs within a config store:
- Log in to the Fastly web interface and click the Resources link.
- Expand the Key-value pairs section.
- Hover your cursor over the entry you want to edit, then click the Edit link that appears.
- Edit the key or value as necessary.
- Click the Save button.
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:
- Log in to the Fastly web interface and click the Resources link.
- Click the trash can icon to the right of the store you want to link.
- Click the Confirm and delete button.
Do not use this form to send sensitive information. If you need assistance, contact support.