This page documents all resources available in the DanubeData Terraform provider.
Manages a Virtual Private Server (VPS) instance.
resource "danubedata_ssh_key" "main" {
name = "my-key"
public_key = file("~/.ssh/id_ed25519.pub")
}
resource "danubedata_vps" "web" {
name = "web-server"
image = "ubuntu-24.04"
datacenter = "fsn1"
resource_profile = "small_shared"
auth_method = "ssh_key"
ssh_key_id = danubedata_ssh_key.main.id
}
| Attribute | Type | Required | Default | Description |
|---|
name | string | Yes | - | Server name. DNS-compatible, lowercase alphanumeric with hyphens. |
image | string | Yes | - | OS image (e.g., ubuntu-24.04, debian-12, alma-9). |
datacenter | string | Yes | - | Datacenter code (currently fsn1). |
resource_profile | string | No | nano_shared | Resource profile. See profiles below. |
cpu_allocation_type | string | No | shared | shared (4:1 overcommit) or dedicated. |
auth_method | string | Yes | - | ssh_key or password. |
ssh_key_id | string | Conditional | - | Required if auth_method = "ssh_key". |
password | string | Conditional | - | Required if auth_method = "password". Min 12 characters. |
network_stack | string | No | dual_stack | ipv4_only, ipv6_only, or dual_stack. |
cpu_cores | number | No | - | Override CPU cores. Requires VPS to be stopped. |
memory_size_gb | number | No | - | Override memory in GB. Requires VPS to be stopped. |
storage_size_gb | number | No | - | Override storage in GB. Requires VPS to be stopped. |
custom_cloud_init | string | No | - | Custom cloud-init configuration. |
Shared CPU:
nano_shared: 2 vCPU, 2 GB RAM, 20 GB NVMemicro_shared: 3 vCPU, 4 GB RAM, 40 GB NVMesmall_shared: 4 vCPU, 8 GB RAM, 80 GB NVMemedium_shared: 8 vCPU, 16 GB RAM, 160 GB NVMelarge_shared: 16 vCPU, 32 GB RAM, 320 GB NVMe
Dedicated CPU:
nano: 2 vCPU, 2 GB RAM, 40 GB NVMemicro: 3 vCPU, 4 GB RAM, 80 GB NVMesmall: 4 vCPU, 8 GB RAM, 160 GB NVMemedium: 8 vCPU, 16 GB RAM, 320 GB NVMelarge: 16 vCPU, 32 GB RAM, 640 GB NVMe
ubuntu-26.04, ubuntu-24.04, ubuntu-22.04debian-13, debian-12, debian-11alma-9, alma-8rocky-9, rocky-8fedora-42, fedora-41alpine-3.22, alpine-3.21, alpine-3.20windows-server-2025
| Attribute | Type | Description |
|---|
id | string | VPS instance ID. |
status | string | Current status (Running, Stopped, etc.). |
public_ip | string | Public IPv4 address. |
private_ip | string | Private IP address. |
ipv6_address | string | IPv6 address (if enabled). |
monthly_cost | number | Monthly cost in EUR. |
monthly_cost_cents | number | Monthly cost in cents. |
deployed_at | string | Deployment timestamp. |
created_at | string | Creation timestamp. |
updated_at | string | Last update timestamp. |
terraform import danubedata_vps.web 12345
Manages a managed database instance.
resource "danubedata_database" "main" {
name = "production-db"
database_name = "myapp"
engine = "postgresql"
version = "16"
resource_profile = "medium"
datacenter = "fsn1"
}
output "connection_string" {
value = "postgresql://${danubedata_database.main.username}@${danubedata_database.main.endpoint}:${danubedata_database.main.port}/${danubedata_database.main.database_name}"
sensitive = true
}
| Attribute | Type | Required | Default | Description |
|---|
name | string | Yes | - | Instance name. DNS-compatible, lowercase alphanumeric. |
engine | string | Yes | - | Database engine: mysql, postgresql, or mariadb. |
database_name | string | No | - | Initial database name. Max 64 characters. |
resource_profile | string | Yes | - | Profile: small, medium, or large. |
version | string | No | - | Engine version (e.g., 16 for PostgreSQL). |
datacenter | string | Yes | - | Datacenter code. |
parameter_group_id | string | No | - | Custom parameter group ID. |
| Profile | vCPU | Memory | Storage |
|---|
small | 1 | 2 GB | 25 GB |
medium | 2 | 4 GB | 50 GB |
large | 4 | 8 GB | 100 GB |
- PostgreSQL: 15, 16, 17, 18
- MySQL: 8.0, 8.4, 9.0, 9.1
- MariaDB: 10.11, 11.4, 11.6
| Attribute | Type | Description |
|---|
id | string | Database instance ID. |
status | string | Current status. |
endpoint | string | Connection hostname. |
port | number | Connection port. |
username | string | Admin username. |
storage_size_gb | number | Storage size in GB. |
memory_size_mb | number | Memory in MB. |
cpu_cores | number | Number of CPU cores. |
monthly_cost | number | Monthly cost in EUR. |
terraform import danubedata_database.main 67890
Manages an in-memory cache instance.
resource "danubedata_cache" "redis" {
name = "app-cache"
cache_provider = "redis"
resource_profile = "small"
datacenter = "fsn1"
}
| Attribute | Type | Required | Default | Description |
|---|
name | string | Yes | - | Instance name. Alphanumeric with hyphens. |
cache_provider | string | Yes | - | Provider: redis, valkey, or dragonfly. |
resource_profile | string | Yes | - | Profile: micro, small, medium, or large. |
memory_size_mb | number | No | - | Override memory size in MB. |
cpu_cores | number | No | - | Override CPU cores. |
version | string | No | - | Provider version. |
datacenter | string | Yes | - | Datacenter code. |
parameter_group_id | string | No | - | Custom parameter group ID. |
| Profile | Memory | vCPU |
|---|
micro | 256 MB | 0.5 |
small | 512 MB | 1 |
medium | 1 GB | 2 |
large | 2 GB | 4 |
- Redis: Industry-standard in-memory data store
- Valkey: Redis-compatible, community-driven fork
- Dragonfly: Multi-threaded, high-performance cache
| Attribute | Type | Description |
|---|
id | string | Cache instance ID. |
status | string | Current status. |
endpoint | string | Connection hostname. |
port | number | Connection port (usually 6379). |
monthly_cost | number | Monthly cost in EUR. |
terraform import danubedata_cache.redis 11111
Manages an S3-compatible object storage bucket.
resource "danubedata_storage_bucket" "assets" {
name = "my-app-assets"
display_name = "Application Assets"
region = "fsn1"
versioning_enabled = true
encryption_enabled = true
}
| Attribute | Type | Required | Default | Description |
|---|
name | string | Yes | - | Bucket name. S3-compatible (3-63 chars, lowercase). |
display_name | string | No | - | Human-readable display name. |
region | string | Yes | - | Region (currently fsn1). |
public_access | bool | No | false | Enable public read access. |
versioning_enabled | bool | No | false | Enable object versioning. |
encryption_enabled | bool | No | true | Enable server-side encryption. |
encryption_type | string | No | sse-s3 | none, sse-s3, or sse-kms. |
| Attribute | Type | Description |
|---|
id | string | Bucket ID. |
status | string | Current status. |
endpoint_url | string | S3 endpoint URL. |
minio_bucket_name | string | Internal bucket name. |
size_bytes | number | Total size in bytes. |
object_count | number | Number of objects. |
monthly_cost | number | Monthly cost in EUR. |
terraform import danubedata_storage_bucket.assets abc123
Manages S3 access keys for object storage.
resource "danubedata_storage_access_key" "app" {
name = "app-storage-key"
}
output "access_key_id" {
value = danubedata_storage_access_key.app.access_key_id
}
output "secret_access_key" {
value = danubedata_storage_access_key.app.secret_access_key
sensitive = true
}
| Attribute | Type | Required | Default | Description |
|---|
name | string | Yes | - | Access key name (1-255 chars). |
expires_at | string | No | - | Expiration date (ISO 8601 format). |
| Attribute | Type | Description |
|---|
id | string | Access key ID (internal). |
access_key_id | string | S3 access key ID. |
secret_access_key | string | S3 secret access key (sensitive). |
status | string | Current status. |
terraform import danubedata_storage_access_key.app key123
Manages SSH keys for VPS authentication.
resource "danubedata_ssh_key" "deploy" {
name = "deploy-key"
public_key = file("~/.ssh/id_ed25519.pub")
}
| Attribute | Type | Required | Default | Description |
|---|
name | string | Yes | - | Key name. |
public_key | string | Yes | - | OpenSSH format public key (ssh-rsa or ssh-ed25519). |
| Attribute | Type | Description |
|---|
id | string | SSH key ID. |
fingerprint | string | SHA256 fingerprint. |
created_at | string | Creation timestamp. |
updated_at | string | Last update timestamp. |
terraform import danubedata_ssh_key.deploy 22222
Manages Knative-based serverless containers.
resource "danubedata_serverless" "api" {
name = "my-api"
deployment_type = "image"
image_url = "ghcr.io/myorg/my-api:latest"
resource_profile = "small"
port = 8080
min_instances = 0
max_instances = 10
environment_variables = {
NODE_ENV = "production"
LOG_LEVEL = "info"
}
}
output "api_url" {
value = danubedata_serverless.api.url
}
| Attribute | Type | Required | Default | Description |
|---|
name | string | Yes | - | Service name. |
resource_profile | string | No | small | Profile: small, medium, or large. |
deployment_type | string | Yes | - | image (Docker) or git. |
image_url | string | Conditional | - | Docker image URL. Required if deployment_type = "image". |
git_repository | string | Conditional | - | Git repo URL. Required if deployment_type = "git". |
git_branch | string | No | main | Git branch to deploy. |
port | number | No | 8080 | Container port (1-65535). |
min_instances | number | No | 0 | Minimum instances. 0 enables scale-to-zero. |
max_instances | number | No | 5 | Maximum instances (1-100). |
environment_variables | map | No | - | Environment variables for the container. |
| Profile | vCPU | Memory |
|---|
small | 0.5 | 512 MB |
medium | 1 | 1 GB |
large | 2 | 2 GB |
| Attribute | Type | Description |
|---|
id | string | Serverless service ID. |
status | string | Current status. |
url | string | Public URL. |
current_month_cost_cents | number | Current month cost in cents. |
terraform import danubedata_serverless.api 33333
Manages firewall rules for network security.
resource "danubedata_firewall" "web" {
name = "web-firewall"
description = "Firewall for web servers"
default_action = "drop"
rules {
name = "allow-ssh"
action = "allow"
direction = "inbound"
protocol = "tcp"
port_range_start = 22
port_range_end = 22
source_ips = ["0.0.0.0/0"]
priority = 100
}
rules {
name = "allow-http"
action = "allow"
direction = "inbound"
protocol = "tcp"
port_range_start = 80
port_range_end = 80
source_ips = ["0.0.0.0/0"]
priority = 200
}
rules {
name = "allow-https"
action = "allow"
direction = "inbound"
protocol = "tcp"
port_range_start = 443
port_range_end = 443
source_ips = ["0.0.0.0/0"]
priority = 300
}
}
| Attribute | Type | Required | Default | Description |
|---|
name | string | Yes | - | Firewall name. |
description | string | No | - | Description. |
is_default | bool | No | false | Mark as default firewall for team. |
default_action | string | No | drop | Default action: drop or accept. |
rules | list | No | - | List of firewall rules. |
| Attribute | Type | Required | Description |
|---|
name | string | Yes | Rule name. |
action | string | Yes | allow or deny. |
direction | string | Yes | inbound or outbound. |
protocol | string | Yes | tcp, udp, or icmp. |
port_range_start | number | No | Start port (1-65535). |
port_range_end | number | No | End port (1-65535). |
source_ips | list | No | List of source CIDR blocks. |
priority | number | Yes | Rule priority (lower = higher priority). |
| Attribute | Type | Description |
|---|
id | string | Firewall ID. |
status | string | Current status. |
terraform import danubedata_firewall.web 44444
Manages point-in-time snapshots of VPS instances.
resource "danubedata_vps_snapshot" "backup" {
name = "pre-upgrade-backup"
description = "Snapshot before major upgrade"
vps_instance_id = danubedata_vps.web.id
}
| Attribute | Type | Required | Default | Description |
|---|
name | string | Yes | - | Snapshot name. |
description | string | No | - | Snapshot description. |
vps_instance_id | string | Yes | - | ID of the VPS instance to snapshot. |
| Attribute | Type | Description |
|---|
id | string | Snapshot ID. |
status | string | Current status. |
size_gb | number | Snapshot size in GB. |
created_at | string | Creation timestamp. |
updated_at | string | Last update timestamp. |
terraform import danubedata_vps_snapshot.backup 55555
Manages point-in-time snapshots of managed databases.
resource "danubedata_database_snapshot" "backup" {
name = "pre-migration"
description = "Snapshot before schema migration"
database_instance_id = danubedata_database.main.id
}
| Attribute | Type | Required | Default | Description |
|---|
name | string | Yes | - | Snapshot name. |
description | string | No | - | Snapshot description. |
database_instance_id | string | Yes | - | ID of the database instance to snapshot. |
| Attribute | Type | Description |
|---|
id | string | Snapshot ID. |
status | string | Current status (pending, completed, failed). |
size_gb | number | Snapshot size in GB. |
created_at | string | Creation timestamp. |
updated_at | string | Last update timestamp. |
terraform import danubedata_database_snapshot.backup 66666
Manages point-in-time snapshots of cache instances.
resource "danubedata_cache_snapshot" "backup" {
name = "nightly"
description = "Nightly cache snapshot"
cache_instance_id = danubedata_cache.sessions.id
}
| Attribute | Type | Required | Default | Description |
|---|
name | string | Yes | - | Snapshot name. |
description | string | No | - | Snapshot description. |
cache_instance_id | string | Yes | - | ID of the cache instance to snapshot. |
| Attribute | Type | Description |
|---|
id | string | Snapshot ID. |
status | string | Current status (pending, completed, failed). |
size_mb | number | Snapshot size in MB. |
created_at | string | Creation timestamp. |
updated_at | string | Last update timestamp. |
terraform import danubedata_cache_snapshot.backup 77777
Adds a read replica to a managed database instance.
resource "danubedata_database_replica" "read" {
database_instance_id = danubedata_database.main.id
}
| Attribute | Type | Required | Default | Description |
|---|
database_instance_id | string | Yes | - | ID of the parent database instance. |
| Attribute | Type | Description |
|---|
id | string | Replica ID. |
replica_index | number | 1-based index of this replica within the parent instance. |
seconds_behind_master | number | Replication lag in seconds. |
is_replication_healthy | bool | Whether replication is healthy. |
# Format: {database_instance_id}:{replica_index}
terraform import danubedata_database_replica.read 67890:1
Manages a reusable parameter group for databases or caches.
resource "danubedata_parameter_group" "redis_tuned" {
name = "redis-high-throughput"
type = "cache"
provider_type = "redis"
description = "Higher I/O threading"
parameters = {
"io-threads" = "4"
}
}
| Attribute | Type | Required | Default | Description |
|---|
name | string | Yes | - | Parameter group name. |
type | string | Yes | - | Group type: cache, database, or queue. |
provider_type | string | Yes | - | Provider, e.g. redis, valkey, dragonfly, mysql, postgresql, mariadb. |
parameters | map(string) | Yes | - | Key/value parameters. Numeric and boolean values are expressed as strings. |
family | string | No | - | Optional family label (e.g. redis7.x). |
description | string | No | - | Optional description. |
| Attribute | Type | Description |
|---|
id | string | Parameter group ID. |
locked_parameters | list(string) | Parameter keys that instances cannot override. |
is_default | bool | Whether this is the default group for the provider type. |
is_active | bool | Whether the group is active. |
is_system | bool | Whether this is a system-managed group (read-only). |
terraform import danubedata_parameter_group.redis_tuned 88888
Manages a static site.
resource "danubedata_static_site" "marketing" {
team_id = 42
name = "marketing-site"
}
| Attribute | Type | Required | Default | Description |
|---|
team_id | number | Yes | - | ID of the team that owns the site. |
name | string | Yes | - | Name of the static site. |
| Attribute | Type | Description |
|---|
id | string | Site ID. |
slug | string | URL slug for the site. |
url | string | Default URL of the deployed site. |
output_directory | string | Build output directory served as the site root. |
status | string | Current status of the site. |
current_deployment_id | number | ID of the currently-active deployment, if any. |
terraform import danubedata_static_site.marketing 99999
danubedata_static_site_domain
Attaches a custom domain to a static site.
resource "danubedata_static_site_domain" "www" {
static_site_id = danubedata_static_site.marketing.id
domain = "www.example.com"
}
After apply, configure the returned verification_record (a CNAME) at your DNS provider.
| Attribute | Type | Required | Default | Description |
|---|
static_site_id | string | Yes | - | ID of the parent static site. |
domain | string | Yes | - | The custom domain (e.g. www.example.com). |
| Attribute | Type | Description |
|---|
id | string | Domain attachment ID. |
type | string | Domain type: default or custom. |
status | string | Status of the domain (pending, active, failed). |
verification_record | string | DNS CNAME record to configure for verification. Empty once verified. |
verified_at | string | Timestamp when the domain was verified, if any. |
# Format: {static_site_id}:{domain}
terraform import danubedata_static_site_domain.www abc123:www.example.com
All resources support configurable timeouts:
resource "danubedata_vps" "app" {
# ...
timeouts {
create = "10m"
update = "10m"
delete = "5m"
}
}