RunlayerInstance.
Samples below are illustrative — adapt to your modules, naming, and security baselines. They are not a required Runlayer Terraform product.
Cluster contract: Kubernetes prerequisites. Identity: Workload identity.
Required for every tenant
Map into CR:
spec.database.*, spec.redis.*, Secrets runlayer-db / runlayer-redis.
Postgres — AWS sample
rds.force_ssl), backups/PITR per your policy, allow node/pod CIDRs to 5432.
Postgres — GCP sample
Redis — AWS sample
spec.redis.tls: true and password Secret when auth is enabled.
Redis — GCP sample
Optional: AI Watch binary packages
Needed so the platform can cache and serve AI Watch installers (RUNLAYER_DOWNLOAD_TOKEN from Runlayer-provided inputs).
AWS sample
Optional: audit stream + consumers
Backend can publish audit events to a stream. Audit consumer and SIEM export are independent consumers of that stream (each needs its own EFO/subscription, checkpoint store, DLQ, and IAM).
Kinesis SIEM export and audit consumer: replicas ≤ 1.
GCP Pub/Sub sample (audit)
{instance}-backend and {instance}-worker on the topic.
AWS Kinesis sample (audit + SIEM on one stream)
Each consumer needs its own EFO consumer, DynamoDB checkpoint table, and DLQ bucket. SIEM also needs a destination bucket (or cross-account write role).audit_publish to {instance}-backend / -worker. Attach kinesis_consumer["audit"] to {instance}-audit-consumer. Attach kinesis_consumer["siem"] + siem_destination_write to {instance}-siem-export (or use a customer-owned assume-role for the destination bucket).
Wire into:
Optional: session materializer
AWS sample (hook-events stream + materializer deps)
session_materializer to {instance}-session-materializer. Attach hook_events_publish (+ payload read) to {instance}-backend / -worker.
Optional: agents (AgentCore)
On AWS, preferred path is Bedrock AgentCore (customer-provisioned). The operator does not create the runtime.AWS sample (runtime + invoke policy)
Image URI is typically Customer Distribution ECR, e.g.088332244652.dkr.ecr.<region>.amazonaws.com/runlayer/agent-sandbox:<version> — confirm the pin with Runlayer.
invoke_agentcore to the IRSA roles for {instance}-backend and {instance}-worker.
sandboxMode: k8s is advanced (separate controller + gVisor/Kata) — see Runlayer Operator.
Other common buckets (AWS / GCS)
Put names inrunlayer-app (or CR fields where documented):
Mirror with GCS IAM for GKE.
Shared GCP project
When any component usesstreamBackend: pubsub:
Next
- Workload identity — map roles to ServiceAccounts
- Runlayer-provided inputs
- Runlayer Operator