| page_title | duploai_k8s_resource_quota Resource - duploai |
|---|---|
| subcategory | |
| description | Manages a DuploCloud AI Helpdesk Kubernetes ResourceQuota. A ResourceQuota enforces per-namespace compute and object limits. |
Manages a DuploCloud AI Helpdesk Kubernetes ResourceQuota. A ResourceQuota enforces per-namespace compute and object limits.
# A ResourceQuota that limits CPU, memory, and pod count in a namespace
resource "duploai_k8s_resource_quota" "example" {
workspace_id = "<workspace-id>"
name = "team-quota"
environment_id = "<environment-id>"
resource_group_id = "<eks-resource-group-id>"
namespace_name = "default"
hard = {
"requests.cpu" = "4"
"requests.memory" = "8Gi"
"limits.cpu" = "8"
"limits.memory" = "16Gi"
"pods" = "20"
}
# Optional: restrict quota to specific pod lifecycle scopes
# scopes = ["NotTerminating"]
labels = {
team = "platform"
}
timeouts {
create = "15m"
delete = "10m"
}
}environment_id(String) ID of the environment that owns the resource group.hard(Map of String) Hard resource limits enforced by this quota. Keys are Kubernetes resource names (e.g. "cpu", "memory", "pods", "requests.cpu", "limits.memory") and values are Kubernetes quantity strings (e.g. "4", "8Gi", "100").name(String) Name of the resource quota. Must be a DNS-1123 label (lowercase alphanumeric and '-', starting and ending with an alphanumeric).namespace_name(String) Kubernetes namespace the resource quota is applied to.resource_group_id(String) ID of the resource group (EKS cluster) this resource quota belongs to.workspace_id(String) ID of the workspace that owns this resource quota.
annotations(Map of String) Kubernetes annotations applied to the resource quota. Send-only (not read back).description(String) Optional description.failure_retries(Number) Number of extra polls to tolerate a transient failure status during provisioning before treating it as terminal. Overrides the resource's default; leave unset to use it.labels(Map of String) Kubernetes labels applied to the resource quota. Send-only: the server injects its own duplocloud.ai/* labels, so this value is not read back to avoid spurious drift.scopes(List of String) Optional list of scopes that restrict which resources this quota applies to (e.g. "Terminating", "NotTerminating", "BestEffort", "NotBestEffort", "PriorityClass"). Immutable: changing this value forces replacement of the resource quota.timeouts(Block, Optional) (see below for nested schema)
id(String) Composite resource identifier (workspace_id/id).k8s_resource_quota_id(String) ID of this resource quota, for reference by dependent resources.status(String) Current provisioning status.
Optional:
create(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).delete(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.update(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Import is supported using the following syntax:
The terraform import command can be used, for example:
# Import an existing Kubernetes ResourceQuota resource.
# - WORKSPACE_ID is the unique identifier of the workspace (e.g. 69b2aa30675718845bfe87a0)
# - QUOTA_ID is the unique identifier of the resource quota (e.g. 6a2258e94703bc957a1b824e)
terraform import duploai_k8s_resource_quota.example WORKSPACE_ID/QUOTA_ID
# Example:
# terraform import duploai_k8s_resource_quota.example 69b2aa30675718845bfe87a0/6a2258e94703bc957a1b824e