fastly_secretstore

A secret store is a persistent, globally distributed store for secrets accessible to Compute services during request processing.

In order for a Secret Store (fastly_secretstore) 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 Secret Store from within the service using the resource_link block (shown in the below examples).

Example Usage

Basic usage:

# IMPORTANT: Deleting a Secret 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_secretstore" "example" {
  name = "my_secret_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_secretstore.example.id
  }

  force_destroy = true
}

data "fastly_package_hash" "example" {
  filename = "package.tar.gz"
}

Import

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

$ terraform import fastly_secretstore.example xxxxxxxxxxxxxxxxxxxx

Schema

Required

Read-Only