Goal
Give implementers and early testers enough detail to model supported StackShift resources and action flows safely.Prerequisites
- The StackShift provider configured in Terraform
- Existing resource IDs when importing
Workflow
Resource ownership
- stackshift_project owns project-level declarative fields such as name, runtime, region, port, source details, and command settings.
- stackshift_project_env owns the entire variable map for one project and environment.
- stackshift_database owns database creation and deletion. Most shape changes replace the resource.
- stackshift_domain owns a project domain mapping.
- stackshift_dns_record owns a DNS record on a registered StackShift-managed domain.
- stackshift_build_action and stackshift_deployment_action own a single requested operation and its returned status.
- stackshift_compute_instance owns VM/VPS provisioning. It is separate from normal StackShift-managed project placement.
- stackshift_compute_action owns a single compute operation such as start, stop, restart, rebuild, or destroy.
- stackshift_agency_client and stackshift_agency_resource_assignment own agency client records and assignments.
- stackshift_runbook and stackshift_runbook_execution own runbook definitions and runbook execution requests.
Managed server projects
Projects deployed on StackShift managed servers do not need a node ID in Terraform. Use stackshift_project without node placement fields; StackShift keeps selecting the managed target on the server side. Only use explicit placement fields where a resource exposes them. For example, stackshift_database has optional target_node_id for explicit database placement, and leaving it unset keeps the managed/default path.Import commands
Action resources
Action resources are intentionally explicit. Creating the resource requests the operation once and stores the returned action state. Deleting the Terraform resource only removes Terraform state for that action record.Build and deployment actions
Runbook execution
Project source patterns
Projects can be created as empty projects, GitHub-backed projects, or image-backed projects. GitHub-backed projects need repository identity fields if you want StackShift to connect the source to an installed GitHub app.GitHub-backed project
Docker image project
Domain and DNS examples
Project domain mapping
Registered-domain DNS record
Delete behavior
- Deleting stackshift_project calls DELETE /projects/{projectID}.
- Deleting stackshift_project_env writes an empty variable set for that project environment.
- Deleting stackshift_database calls DELETE /projects/{projectID}/databases/{databaseID}.
- Deleting stackshift_domain removes the project domain mapping.
- Deleting stackshift_dns_record removes the record from the registered domain DNS zone.
Expected result
The provider resources have clear ownership boundaries while registry publishing and full acceptance coverage are still pending.
Common failures
Related guides
Terraform and OpenTofu provider
Use the StackShift provider implementation to declare StackShift resources and run explicit StackShift actions from Terraform or OpenTofu.
DNS records and project connection
Manage DNS records and connect domains to projects or other runtime surfaces.
Credentials, pooling, and usage expectations
Understand how to consume database connection details and what to assume about pooling and access patterns.