terraform-provider-stackgen

sg_agent (Data Source)

⚠️ Experimental — Looks up an existing StackGen AI agent by name. When provider workspace_id is set, the lookup is scoped to that workspace.

Example Usage

# When to use: Adopt an app-managed or pre-existing agent read-only (e.g. SRE
# investigator) so workflows and attachments can reference it by name without
# owning the agent resource in this stack.
#
# Set provider workspace_id so the lookup is org-scoped.
data "sg_agent" "investigator" {
  name = "sre-investigator"
}

output "investigator_integrations" {
  value = data.sg_agent.investigator.integrations
}

Schema

Required

Read-Only

Nested Schema for auto_approve_tools

Required:

Optional: