Skip to content
Back home

Terraform Provider

Manage Puchify infrastructure declaratively with HashiCorp Terraform. 12 resources, 4 data sources, full CRUD, state import, and plan-based workflows.

Provider configuration

terraform {
  required_providers {
    puchify = {
      source  = "puchify/puchify"
      version = "~> 0.1"
    }
  }
}

variable "puchify_api_key" {
  type        = string
  description = "Puchify API key"
  sensitive   = true
}

provider "puchify" {
  api_key = var.puchify_api_key
}

Full stack example

# Create an application server
resource "puchify_server" "app" {
  name   = "app-server"
  plan   = "standard-2"
  region = "us-east"
  image  = "ubuntu-24.04"
}

# Create a managed Postgres database
resource "puchify_data" "main" {
  name   = "main-db"
  engine = "postgres"
  plan   = "starter"
}

# Configure DNS
resource "puchify_domain" "site" {
  name = "app.example.com"
}

# Store user uploads
resource "puchify_object_storage_bucket" "assets" {
  name = "app-assets"
}

# Distribute traffic
resource "puchify_load_balancer" "api" {
  name = "api-lb"
}

# Schedule backups
resource "puchify_backup" "daily" {
  resource_id = puchify_server.app.id
  schedule    = "daily"
  retention   = 7
}

State import

Already have resources created through the dashboard, CLI, or API? Import them into Terraform state without recreating.

terraform import puchify_server.app server_abc123
terraform import puchify_data.main db_xyz789
terraform import puchify_domain.site domain_example_com

Data sources

List available regions

data "puchify_regions" "all" {}

output "regions" {
  value = data.puchify_regions.all.items
}

Filter plans by minimum vCPUs

data "puchify_plans" "small" {
  min_vcpus = 2
}

List existing servers

data "puchify_servers" "all" {}

Full resource catalog

puchify_server

Virtual servers — CRUD, restart, destroy.

puchify_gpu_server

GPU-accelerated servers

puchify_data

Managed databases (Postgres, MySQL, Redis, Valkey)

puchify_kubernetes_cluster

Managed Kubernetes clusters

puchify_object_storage_bucket

S3-compatible object storage buckets

puchify_file_storage_share

NFS-backed file shares

puchify_load_balancer

HTTP/TCP load balancers

puchify_vpn_gateway

Site-to-site VPN gateways

puchify_nat_gateway

Outbound internet NAT

puchify_domain

DNS management with TLS

puchify_backup

Backup and restore service

puchify_webhook

Event-driven webhook subscriptions