Provides a container that lets you store data in key-value pairs that are accessible to Compute services during request processing.
In order for a Config Store (fastly_configstore
) to be accessible to a Compute service you'll first need to define a Compute service (fastly_service_compute
) in your configuration, and then create a link to the Config Store from within the service using the resource_link
block (shown in the below examples).
Basic usage:
# IMPORTANT: Deleting a Config Store requires first deleting its resource_link.
# This requires a two-step `terraform apply` as we can't guarantee deletion order.
# e.g. resource_link deletion within fastly_service_compute might not finish first.
resource "fastly_configstore" "example" {
name = "my_config_store"
}
resource "fastly_service_compute" "example" {
name = "my_compute_service"
domain {
name = "demo.example.com"
}
package {
filename = "package.tar.gz"
source_code_hash = data.fastly_package_hash.example.hash
}
resource_link {
name = "my_resource_link"
resource_id = fastly_configstore.example.id
}
force_destroy = true
}
data "fastly_package_hash" "example" {
filename = "package.tar.gz"
}
Fastly Config Stores can be imported using their Store ID, e.g.
$ terraform import fastly_configstore.example xxxxxxxxxxxxxxxxxxxx
name
(String) A unique name to identify the Config Store. It is important to note that changing this attribute will delete and recreate the Config Store, and discard the current entries. You MUST first delete the associated resource_link block from your service before modifying this field.force_destroy
(Boolean) Allow the Config Store to be deleted, even if it contains entries. Defaults to false.id
(String) The ID of this resource.