Basic Deployment
The simplest deployment: one app, one replica, public endpoint.Dynamic Discovery
Instead of hardcoding sizes, regions, and images, use data sources to discover valid values at plan time.Multi-Replica Deployment
Scale an application horizontally by settingreplicas. All replicas share the same compose file and environment.
Cross-App Wiring
Deploy one app and pass its outputs (app ID, endpoint) as environment variables to a second app. Terraform handles the dependency ordering automatically.SSH Access
Inject SSH keys at deploy time for direct access into CVM instances. You can also manage account-level SSH keys separately withphala_ssh_key.
The
ssh_authorized_keys attribute is force-new. Changing the key list after initial deployment requires recreating the app. For keys you want to manage independently, use phala_ssh_key at the account level.GPU Deployment
For GPU workloads, use a size from the GPU family. Discover available GPU sizes with thefamily filter.
Node Pinning
Pin a deployment to a specific worker node when you need deterministic hardware placement.Power Management
Usephala_cvm_power to stop and start CVMs independently of the app lifecycle. This is useful for cost control or scheduled maintenance.
state to "running" and run terraform apply.
Attestation Verification
After deployment, fetch TEE attestation data to verify the CVM’s integrity.Compose Runtime Settings
Control visibility and behavior flags at the compose level. Changing these triggers a compose update and CVM restart.Related
- Provider Overview — installation and configuration
- phala_app Resource — full attribute reference
- Data Sources — discovery data sources

