Skip to content
Start here

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

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

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

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.

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.

scopes?: List[String]

The list of services that can use this secret. Omit it on create or duplicate to inherit the store’s scopes. An empty list lets no service use 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, or null when the secret inherits its store’s scopes. Set it to null in a patch to inherit again. An empty list lets no service use the 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

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.

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, or null when the secret inherits its store’s scopes. Set it to null in a patch to inherit again. An empty list lets no service use the secret.

cloudflare_secrets_store_secret

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
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, or null when the secret inherits its store’s scopes. Set it to null in a patch to inherit again. An empty list lets no service use the secret.

cloudflare_secrets_store_secrets

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