terraform-provider-stackgen

sg_session_share (Resource)

⚠️ Experimental — Manages a Guild conversation session’s active share. The session ID is the import key. Revoking the share on delete makes the shared conversation inaccessible. This resource stores only share metadata, never conversation content.

Example Usage

# Share an existing Guild conversation session with the current tenant.
# WARNING: The opaque share_id is sensitive but remains in Terraform state;
# secure the state backend. Destroy revokes access to the shared session.
resource "sg_session_share" "example" {
  session_id = var.guild_session_id
  visibility = "tenant" # or "global"
}

variable "guild_session_id" {
  description = "ID of an existing Guild conversation session (placeholder)."
  type        = string
}

Import

Import an existing sg_session_share using its conversation session ID:

terraform import sg_session_share.example 'session-123'

Operational notes

A global share is readable by anyone with the link; a tenant share is restricted to the tenant. The share ID is stable across visibility updates but the public URL path changes. Treat the share ID and Terraform state as sensitive. Delete revokes the link; it does not delete the session.

Schema

Required

Read-Only