---
title: Secrets Store
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api/terraform)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Secrets Store

#### Secrets StoreStores

#### resource cloudflare\_secrets\_store

##### required Expand Collapse 

account\_id: String

name: String

The name of the store.

##### computed Expand Collapse 

id: String

Store Identifier.

created: Time

When the secret was created.

modified: Time

When the secret was modified.

### cloudflare\_secrets\_store

Terraform

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
resource "cloudflare_secrets_store" "example_secrets_store" {
  account_id = "985e105f4ecef8ad9ca31a8372d0c353"
  name = "service_x_keys"
}

```

#### data cloudflare\_secrets\_store

##### required Expand Collapse 

account\_id: String

##### optional Expand Collapse 

store\_id?: String

filter?: Attributes

direction?: String

Direction to sort objects.

order?: String

Order stores by values in the given field.

##### computed Expand Collapse 

id: String

created: Time

When the secret was created.

modified: Time

When the secret was modified.

name: String

The name of the store.

### cloudflare\_secrets\_store

Terraform

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
data "cloudflare_secrets_store" "example_secrets_store" {
  account_id = "985e105f4ecef8ad9ca31a8372d0c353"
  store_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

```

#### data cloudflare\_secrets\_stores

##### required Expand Collapse 

account\_id: String

##### optional Expand Collapse 

direction?: String

Direction to sort objects.

order?: String

Order stores by values in the given field.

max\_items?: Int64

Max items to fetch, default: 1000

##### computed Expand Collapse 

result: List\[Attributes\]

The items returned by the data source

id: String

Store Identifier.

created: Time

When the secret was created.

modified: Time

When the secret was modified.

name: String

The name of the store.

account\_id: String

Account Identifier.

### cloudflare\_secrets\_stores

Terraform

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
data "cloudflare_secrets_stores" "example_secrets_stores" {
  account_id = "985e105f4ecef8ad9ca31a8372d0c353"
}

```

#### Secrets StoreStoresSecrets

#### resource cloudflare\_secrets\_store\_secret

##### required Expand Collapse 

account\_id: String

store\_id: String

body: List\[Attributes\]

name: String

The name of the secret.

scopes: List\[String\]

The list of services that can use this secret.

value: String

The value of the secret. Maximum 64 KiB (65,536 bytes). Note that this is ‘write only’ - the API never returns this value; it exists only to create or modify secrets.

comment?: String

Freeform text describing the secret.

##### optional Expand Collapse 

comment?: String

Freeform text describing the secret.

value?: String

The value of the secret. Maximum 64 KiB (65,536 bytes). Note that this is ‘write only’ - the API never returns this value; it exists only to create or modify secrets.

scopes?: List\[String\]

The list of services that can use this secret.

##### computed Expand Collapse 

id: String

Secret identifier tag.

created: Time

When the secret was created.

modified: Time

When the secret was modified.

name: String

The name of the secret.

status: String

### cloudflare\_secrets\_store\_secret

Terraform

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
resource "cloudflare_secrets_store_secret" "example_secrets_store_secret" {
  account_id = "985e105f4ecef8ad9ca31a8372d0c353"
  store_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

```

#### data cloudflare\_secrets\_store\_secret

##### required Expand Collapse 

account\_id: String

store\_id: String

##### optional Expand Collapse 

secret\_id?: String

filter?: Attributes

direction?: String

Direction to sort objects.

order?: String

Order secrets by values in the given field.

scopes?: List\[String\]

Only secrets with the given scopes will be returned.

search?: String

Search secrets using a filter string, filtering across name and comment.

##### computed Expand Collapse 

id: String

comment: String

Freeform text describing the secret.

created: Time

When the secret was created.

modified: Time

When the secret was modified.

name: String

The name of the secret.

status: String

scopes: List\[String\]

The list of services that can use this secret.

### cloudflare\_secrets\_store\_secret

Terraform

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
data "cloudflare_secrets_store_secret" "example_secrets_store_secret" {
  account_id = "985e105f4ecef8ad9ca31a8372d0c353"
  store_id = "023e105f4ecef8ad9ca31a8372d0c353"
  secret_id = "3fd85f74b32742f1bff64a85009dda07"
}

```

#### data cloudflare\_secrets\_store\_secrets

##### required Expand Collapse 

account\_id: String

store\_id: String

##### optional Expand Collapse 

search?: String

Search secrets using a filter string, filtering across name and comment.

scopes?: List\[String\]

Only secrets with the given scopes will be returned.

direction?: String

Direction to sort objects.

order?: String

Order secrets by values in the given field.

max\_items?: Int64

Max items to fetch, default: 1000

##### computed Expand Collapse 

result: List\[Attributes\]

The items returned by the data source

id: String

Secret identifier tag.

created: Time

When the secret was created.

modified: Time

When the secret was modified.

name: String

The name of the secret.

status: String

store\_id: String

Store Identifier.

comment: String

Freeform text describing the secret.

scopes: List\[String\]

The list of services that can use this secret.

### cloudflare\_secrets\_store\_secrets

Terraform

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
data "cloudflare_secrets_store_secrets" "example_secrets_store_secrets" {
  account_id = "985e105f4ecef8ad9ca31a8372d0c353"
  store_id = "023e105f4ecef8ad9ca31a8372d0c353"
  scopes = ["workers"]
  search = "search"
}

```