terraform-provider-stackgen

sg_agent_budget (Resource)

⚠️ Experimental — This resource is part of the Guild platform and may change in future releases.

Manages the cost budget for an agent. Budgets enforce spend limits on a daily or monthly cadence. When the limit is exceeded the agent’s API calls are blocked until the next period.

Example Usage

resource "sg_agent" "example" {
  name = "budgeted-agent"
}

resource "sg_agent_budget" "example" {
  agent_name  = sg_agent.example.name
  limit_usd   = 100
  period_type = "monthly"
}
resource "sg_agent" "burst" {
  name = "burst-agent"
}

resource "sg_agent_budget" "daily_cap" {
  agent_name  = sg_agent.burst.name
  limit_usd   = 5
  period_type = "daily"
}

Import

Import an existing sg_agent_budget using its agent name:

terraform import sg_agent_budget.example 'my-first-agent'

Schema

Required

Read-Only