fastly_configstore

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

Example Usage

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"
}

Import

Fastly Config Stores can be imported using their Store ID, e.g.

$ terraform import fastly_configstore.example xxxxxxxxxxxxxxxxxxxx

Schema

Required

Optional

Read-Only