ignitify_api_key
An API key of a user. Needs an owner key. The raw key is stored in the state as a sensitive value. A user key never expires: destroy the resource to revoke it.
Example
resource "ignitify_api_key" "ci" {
user = ignitify_user.ci.name
label = "ci-pipeline"
}
# The raw key is in the state as a sensitive value.
# Pass it to a secret store. Never print it.
output "ci_key" {
value = ignitify_api_key.ci.raw_key
sensitive = true
}Arguments and attributes
| Name | Type | Use | Meaning |
|---|---|---|---|
user | String | Requiredforces replacement | The name of the user that holds the key. |
label | String | Requiredforces replacement | A label for the key. 1 to 64 letters, digits, ., _ and -, not starting or ending with -. |
raw_key | String | Read-onlysensitive | The key itself. The server shows it once, at create. Empty after an import. |
created_at | String | Read-only | When the key was created (ISO 8601). |
resource_id | String | Read-onlyimport id | The server id of the key. |
Behaviour
- A new
userorlabelreplaces the key, and the new key has a new value. Update the place where you stored the old one. - A user key never expires. To rotate it, replace the resource:
terraform apply -replace=ignitify_api_key.ci. - The plan of your tier caps the number of keys. A create above the cap fails at once with a plan-limit error.
Import
The import id is the resource_id of the key. After an import, raw_key is empty, because the server cannot show it again.
$ terraform import ignitify_api_key.ci <resource_id>