> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dedaluslabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Terraform Provider

> Manage Dedalus Cloud workspaces as infrastructure-as-code.

The Dedalus Terraform provider lets you declare workspaces in HCL and manage them with `terraform apply`.

<Note>The Terraform provider is in beta. Some features may change.</Note>

## Install

```hcl theme={"theme":{"light":"github-light","dark":"github-dark"}}
terraform {
  required_providers {
    dedalus = {
      source  = "dedalus-labs/dedalus"
      version = "~> 0.0.1"
    }
  }
}

provider "dedalus" {
  api_key = var.dedalus_api_key  # or set DEDALUS_API_KEY
}
```

## Resources

### Workspace

```hcl theme={"theme":{"light":"github-light","dark":"github-dark"}}
resource "dedalus_workspace" "dev" {
  vcpu        = 2
  memory_mib  = 4096
  storage_gib = 20

  timeouts {
    create = "10m"
    update = "10m"
    delete = "10m"
  }
}

output "workspace_id" {
  value = dedalus_workspace.dev.workspace_id
}
```

## Data Sources

### Single workspace

```hcl theme={"theme":{"light":"github-light","dark":"github-dark"}}
data "dedalus_workspace" "existing" {
  workspace_id = "ws_abc123"
}
```

### List workspaces

```hcl theme={"theme":{"light":"github-light","dark":"github-dark"}}
data "dedalus_workspaces" "all" {}
```

## Links

|                    |                                                                                                       |
| ------------------ | ----------------------------------------------------------------------------------------------------- |
| Repository         | [dedalus-labs/terraform-provider-dedalus](https://github.com/dedalus-labs/terraform-provider-dedalus) |
| Terraform Registry | Coming soon                                                                                           |
