ignitify_secret
A tenant secret that tasks read by name. The value is write-only: it never reaches the plan or the state. Works with a user key that holds secrets.read and secrets.write.
Example
variable "db_password" {
type = string
sensitive = true
ephemeral = true
}
# The value is write-only. Raise value_wo_version to send a new value.
resource "ignitify_secret" "db_password" {
name = "DB_PASSWORD"
value_wo = var.db_password
value_wo_version = 1
}Arguments and attributes
| Name | Type | Use | Meaning |
|---|---|---|---|
name | String | Requiredforces replacement · import id | The secret name. 1 to 64 capital letters, digits and _, starting with a letter. |
value_wo | String | Requiredsensitive · write-only | The secret value. Terraform cannot see a change of a write-only argument, so change value_wo_version to send it again. |
value_wo_version | Number | Optional | Any number. A change sends value_wo to the API again. |
updated_at | String | Read-only | When the value was last written (ISO 8601). A write made outside Terraform shows here. |
Behaviour
- Declare the variable as
ephemeral, so Terraform never stores the value. - A create refuses a name that already exists, because the write would overwrite the value. To manage an existing secret, import it first.
- After an import the state has no version. If your code sets
value_wo_version, the first apply sends your value once. If it sets none, nothing is sent. - The plan of your tier caps the number of secrets. A create above the cap fails at once with a plan-limit error.
A task reads the secret by name. See Use secrets.
Import
The import id is the secret name.
$ terraform import ignitify_secret.db_password DB_PASSWORD