Your infrastructure, reviewed as code.
Manage databases, caches and object storage with the DanubeData Terraform provider. Keep the configuration in Git, review a plan, then apply it to your infrastructure in Germany.
- European-owned
- German data centers
- TLS encrypted
terraform {
required_providers {
danubedata = {
source = "AdrianSilaghi/danubedata"
version = "= 0.3.4"
}
}
}
# Set DANUBEDATA_API_TOKEN in your environment.
provider "danubedata" {}Provider 0.3.4. View on the Terraform Registry.
What customers say
“As a developer and cloud enthusiast, I’ve tried a lot of infrastructure platforms — but DanubeData genuinely stands out as one of the most intuitive, modern, and reliable cloud services I’ve used. From signup to deployment, everything feels thoughtfully designed and developer-centric. Deploying a VPS, cache, or database instance takes under a minute — and that’s not an exaggeration! Their intuitive dashboard and instant provisioning make launching new services effortless, even if you’re just getting started with cloud infrastructure”
Start with a configuration you can read.
Use the provider setup with one of these examples. The application stack combines the database, cache and bucket in one file.
Save this as main.tf. Supply a project-scoped API token through your environment, rather than a committed file.
terraform {
required_providers {
danubedata = {
source = "AdrianSilaghi/danubedata"
version = "= 0.3.4"
}
}
}
# Set DANUBEDATA_API_TOKEN in your environment.
provider "danubedata" {}Add to the provider configuration. resource_profile takes a plan slug, such as micro, rather than its dashboard display name.
resource "danubedata_database" "main" {
name = "app-database"
database_name = "myapp"
engine = "postgresql"
resource_profile = "micro"
datacenter = "fsn1"
}
output "database_endpoint" {
value = danubedata_database.main.endpoint
}Add a managed Redis cache. CPU and memory are derived from the plan; they are not writable arguments.
resource "danubedata_cache" "sessions" {
name = "app-sessions"
cache_provider = "redis"
resource_profile = "micro"
datacenter = "fsn1"
}
output "cache_endpoint" {
value = danubedata_cache.sessions.endpoint
}Create a private, versioned S3-compatible bucket. Use the returned bucket name and endpoint in your application.
resource "danubedata_storage_bucket" "uploads" {
name = "app-uploads"
region = "fsn1"
versioning_enabled = true
public_access = false
}
output "storage_endpoint" {
value = danubedata_storage_bucket.uploads.endpoint_url
}
output "bucket_name" {
value = danubedata_storage_bucket.uploads.minio_bucket_name
}Combine the database, cache and bucket in one configuration. These examples omit VPS creation because of the release limitation below.
resource "danubedata_database" "main" {
name = "app-database"
database_name = "myapp"
engine = "postgresql"
resource_profile = "micro"
datacenter = "fsn1"
}
output "database_endpoint" {
value = danubedata_database.main.endpoint
}
resource "danubedata_cache" "sessions" {
name = "app-sessions"
cache_provider = "redis"
resource_profile = "micro"
datacenter = "fsn1"
}
output "cache_endpoint" {
value = danubedata_cache.sessions.endpoint
}
resource "danubedata_storage_bucket" "uploads" {
name = "app-uploads"
region = "fsn1"
versioning_enabled = true
public_access = false
}
output "storage_endpoint" {
value = danubedata_storage_bucket.uploads.endpoint_url
}
output "bucket_name" {
value = danubedata_storage_bucket.uploads.minio_bucket_name
}Read existing buckets and available image IDs without declaring new resources.
data "danubedata_storage_buckets" "all" {}
output "bucket_names" {
value = [for bucket in data.danubedata_storage_buckets.all.buckets : bucket.name]
}
data "danubedata_vps_images" "all" {}
output "available_images" {
value = [for image in data.danubedata_vps_images.all.images : image.id]
}Run from the directory containing your configuration. Plan and apply use the same reviewed change set.
# Set a project-scoped DANUBEDATA_API_TOKEN first.
terraform init
terraform fmt
terraform validate
terraform plan -out=tfplan
# Review the saved plan before approving changes.
terraform show tfplan
terraform apply tfplanVPS creation in 0.3.4
The API requires cpu_platform, which this provider release does not expose. For new VPS instances, use the console or the danube CLI. Explore VPS options while this limitation remains.
Choose a plan using its slug, and check current pricing before applying. A plan is a change preview, not a forecast of your bill.
The provider catalog, in one place.
Version 0.3.4 registers 15 resource types and 16 data sources. Open a group for the reference, including its arguments, returned values and import instructions.
Registered resources
Compute and hosting
Databases and caches
Storage and access
Data sources
Read resources and provider catalogs
- danubedata_vpss
- danubedata_vps_images
- danubedata_databases
- danubedata_database_providers
- danubedata_database_snapshots
- danubedata_caches
- danubedata_cache_providers
- danubedata_cache_snapshots
- danubedata_parameter_groups
- danubedata_serverless_containers
- danubedata_static_sites
- danubedata_storage_buckets
- danubedata_storage_access_keys
- danubedata_ssh_keys
- danubedata_firewalls
- danubedata_vps_snapshots
Resource names describe the provider schema. Read the reference and release notes for each capability you intend to use.
Make infrastructure changes reviewable.
Use the same configuration in your terminal and CI. Keep the approval, state and credentials explicit.
Review the change before applying it
Commit HCL and the provider lockfile. Read the plan in a pull request or CI job, then approve the saved plan.
Reuse modules, separate state
Share resource definitions through modules. Give each environment its own state key and project-scoped API token.
Bring existing resources under management
Use terraform import with the resource ID and matching configuration. Review the next plan before making changes.
Protect credentials and state
Keep API tokens in environment variables or CI secrets. Sensitive outputs still live in state, so control access to your backend.
Before your first apply.
Provider versions, state and existing resources.
Read the provider reference or DanubeData help for the details.
Create a project-scoped token from Security > API tokens in the DanubeData console, with permissions for the resources you manage. Supply it through DANUBEDATA_API_TOKEN. Keep it out of version control.
Link to this answer
Put your next change in a plan.
Create an account, issue a scoped token and start with a small configuration you can review.
