terraform-provider-stackgen

sg_remote_runner_attachments (Resource)

⚠️ Experimental — Replaces agent and app attachments on a remote runner.

Calls Guild PUT /api/v1/remote-runners/{id}/attachments without rewriting agent personas. Use this when the runner already exists (lookup / imported) or when attach should be managed independently of sg_remote_runner registration — same pattern as sg_remote_runner_secrets.

Prefer attached_apps = ["sre"] for StackGen SRE Copilot catalog investigators. Do not also set attached_agents / attached_apps on the same runner via sg_remote_runner in the same root — pick one owner to avoid thrash.

Example Usage

# Attach an existing remote runner to SRE catalog agents without persona rewrite.
resource "sg_remote_runner_attachments" "sre" {
  runner_id       = "guild-dogfood"
  attached_apps   = ["sre"]
  attached_agents = ["stackgen-sre-investigator"]
}

Import

Import an existing sg_remote_runner_attachments using its runner UUID:

terraform import sg_remote_runner_attachments.example '123e4567-e89b-12d3-a456-426614174000'

Schema

Required

Optional