Provider configuration
The ignitify provider has two arguments, and both have an environment variable. Most setups need only the key.
Arguments
| Name | Type | Use | Meaning |
|---|---|---|---|
api_key | String | Optionalsensitive | The API key. Defaults to the IGNITIFY_API_KEY environment variable. Users, groups and user keys need an owner key. Secrets, tasks, deployments, hooks and schedules work with a user key that holds their permissions. |
endpoint | String | Optional | The API base URL. Defaults to the IGNITIFY_API_URL environment variable, else https://api.ignitify.dev. It must use https. Plain http is accepted only to your own machine. |
An argument in the block wins over its environment variable. With no key at all, the plan fails with no API key. Both values must be known when the provider starts, so do not set them from a value that Terraform computes during the apply.
Example
terraform {
required_version = ">= 1.11"
required_providers {
ignitify = {
source = "ignitify-dev/ignitify"
}
}
}
# The key comes from IGNITIFY_API_KEY. Do not commit a key.
provider "ignitify" {}$ export IGNITIFY_API_KEY=<your key>The provider is on the Terraform Registry. init installs it and checks its signature. A local build stays an option for development.
Which key to use
| Key | What it manages |
|---|---|
| Owner key | ignitify_user, ignitify_group and ignitify_api_key. An owner key manages access only. Keep it in a separate root module that you apply by hand. |
| User key | ignitify_secret, ignitify_task, ignitify_deployment, ignitify_hook and ignitify_schedule. The groups of the key's user must grant the permissions each resource needs. Use it in CI. |
| Any key | The data source ignitify_whoami. |
With a user key, an access resource fails with owner-required. The Users, groups and permissions guide explains the permissions.
How the provider talks to the API
- Idempotency. Every write carries an idempotency key, so a retry after a lost answer never acts twice.
- Retries. A request is tried up to 4 times. The provider retries a missing answer, a short rate limit (it waits as long as the server asks, up to 30 seconds), and a
503that carries a wait. It waits 1, 2 and 4 seconds between tries. - No retry. A plan limit (for example the cap on keys or secrets) fails at once. So does a rate limit with a wait longer than 30 seconds, and the error names that wait. A refused key (
auth-throttled) is never retried. - Forgetting an object. Terraform removes an object from the state only when the API answers that exactly that object does not exist. A wrong address or a proxy page is an error, so it never makes Terraform forget an object.
- No CLI file. The provider does not read the credentials file of the Ignitify CLI.