- English
- 日本語
Working with config stores
Last updated 2024-05-10
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:
- Log in to the Fastly web interface.
- Go to Resources > Config stores.
- Click Create a config store.
- In the Name of config store field, enter a name for the config store and then click Add.
- Click the Key-value pairs link.
- Click Add item.
- Enter the key and the value in the appropriate column and then click Add.
- 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.
Using the Resources controls to link config stores to a service
To link a config store to a service from the Resources controls:
- Log in to the Fastly web interface.
Go to Resources > Config stores.
Click Link to services to the right of the store you want to link.
Select the checkbox next to any services you want to link your config store to.
Click Next.
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.
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.
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.
Using the service configuration to link config stores to a service
To link a config store to a service from the service configuration:
- 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 Service configuration.
- From the Resources options in the on-page navigation, click Config stores.
- 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:
- 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 Service configuration.
- From the Resources options in the on-page navigation, click Config stores.
- Click Unlink from service next to the config store you want to unlink from your service.
- Click Confirm and unlink. A new, draft version of the service is created.
- 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:
- Click the pencil to the right of the store you want to rename.
- Enter a new name for the config store.
- Click Save and then Confirm and rename to continue.
TIP
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:
- Expand the Key-value pairs section.
- Under Key-value pairs, click Add item.
- Enter the key and the value in the appropriate column and then click Add.
- Repeat for any additional key-value pairs.
To edit the key-value pairs within a config store:
- Expand the Key-value pairs section.
- Hover your cursor over the entry you want to edit, then click Edit.
- Edit the key or value as necessary.
- 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:
- Log in to the Fastly web interface.
- Go to Resources > Config stores.
- Click the trash to the right of the store you want to delete.
- Click Confirm and delete.
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.