ignitify_whoami
A data source. It reads the tenant, the calling key, the permissions it holds, the limits of your plan and what the tenant holds now. It works with any key.
Example
data "ignitify_whoami" "me" {}
# Stop early when the configuration needs an owner key.
check "owner_key" {
assert {
condition = data.ignitify_whoami.me.is_owner_key
error_message = "This configuration manages access and needs an owner key."
}
}Attributes
Every attribute is read-only. The data source has no arguments.
| Name | Type | Use | Meaning |
|---|---|---|---|
tenant_id | String | Read-only | The tenant id. |
tenant_name | String | Read-only | The tenant name. |
status | String | Read-only | The tenant status. |
tier_name | String | Read-only | The tenant's plan. |
tier_version | Number | Read-only | The version of the plan. |
key_id | String | Read-only | The resource id of the calling key. |
is_owner_key | Boolean | Read-only | Whether the calling key is an owner key. |
user | String | Read-only | The user that holds the calling key. Null for an owner key. |
groups | Set of String | Read-only | The groups of the key's user. |
permissions | Set of String | Read-only | The permissions the key holds. |
limits | Object | Read-only | The limits of your plan. A null limit is unlimited. See below. |
usage | Object | Read-only | What the tenant holds now. See below. |
limits
| Name | Type | Use | Meaning |
|---|---|---|---|
max_tasks | Number | Read-only | Most tasks. |
max_running_vms | Number | Read-only | Most VMs running at once. |
max_pinned_vms | Number | Read-only | Most pinned VMs. |
max_units | Number | Read-only | Most run units in use at once. |
max_storage_mib | Number | Read-only | Scratch storage per run, in MiB. |
max_total_image_bytes | Number | Read-only | Most bytes in the image store. |
max_payload_bytes | Number | Read-only | Most bytes passed into a task. The same for every tenant. |
max_result_bytes | Number | Read-only | Most bytes a task sends back. The same for every tenant. |
usage
| Name | Type | Use | Meaning |
|---|---|---|---|
task_count | Number | Read-only | Tasks. |
deployment_count | Number | Read-only | Deployments. |
active_runs | Number | Read-only | Active runs. |
active_units | Number | Read-only | Run units in use. |
pinned_vms | Number | Read-only | Pinned VMs. |
total_image_bytes | Number | Read-only | Bytes in the image store. |
Check a limit before you apply
A check block shows a warning in the plan. It does not stop the apply.
# Warn, with a clear message, when no task slot is free.
check "task_slot" {
assert {
condition = (
data.ignitify_whoami.me.limits.max_tasks == null ||
data.ignitify_whoami.me.usage.task_count < data.ignitify_whoami.me.limits.max_tasks
)
error_message = "The plan has no free task slot."
}
}