# UpCloud-Specific Examples

Production patterns for UpCloud platform.

## UpCloud Server Deployment

```nickel
{
  upcloud = {
    zone = "us-sjc",

    servers = [
      {
        hostname = "web-01.example.com",
        plan = "4xCPU-8GB",
        storage_tier = "maxiops",

        storage = {
          size = 100,
          tier = "maxiops",
          action = "clone",
          template = "01000000-0000-4000-8000-000030060200"
        },

        networking = {
          interfaces = [
            {
              type = "public",
              ip_addresses = [{ family = "IPv4" }]
            },
            {
              type = "private",
              ip_addresses = [{ family = "IPv4" }]
            }
          ]
        },

        firewall = {
          enabled = true,
          rules = [
            {
              action = "accept",
              direction = "in",
              family = "IPv4",
              protocol = "tcp",
              destination_port_start = 22,
              destination_port_end = 22
            }
          ]
        },

        tags = ["web", "production"],
        metadata = true
      }
    ]
  }
}
```

## UpCloud Network Setup

```nickel
{
  upcloud = {
    # Private network
    network = {
      name = "prod-network",
      type = "private",
      zone = "us-sjc"
    },

    # Routers for VPN/VPC features
    router = {
      name = "prod-router",
      interfaces = [
        {
          network = "prod-network",
          prefix_length = 24,
          ip_address = "10.0.0.1"
        }
      ]
    }
  }
}
```

## UpCloud Database

```nickel
{
  upcloud = {
    database = {
      service_name = "prod-db",
      database_type = "pg",
      plan = "business-4",

      maintenance_window_day = "sunday",
      maintenance_window_time = "03:00-04:00",

      backup_hour = 3,
      backup_minute = 0,

      databases = [
        {
          name = "production"
        }
      ]
    }
  }
}
```

## Related Documentation

- [UpCloud Provider Guide](../infrastructure/provider-guides.md)
- [Multi-Cloud Deployment](./multi-cloud.md)
