terraform-provider-danubedata

command module
v0.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2026 License: MPL-2.0 Imports: 5 Imported by: 0

README

Terraform Provider for DanubeData

The DanubeData Terraform provider allows you to manage DanubeData infrastructure resources using Terraform.

Requirements

  • Terraform >= 1.0
  • Go >= 1.21 (for building from source)
  • A DanubeData account and API token

Installation

terraform {
  required_providers {
    danubedata = {
      source  = "AdrianSilaghi/danubedata"
      version = "~> 0.3"
    }
  }
}
Building from Source
git clone https://github.com/AdrianSilaghi/terraform-provider-danubedata.git
cd terraform-provider-danubedata
make install

Authentication

The provider requires an API token for authentication. You can provide it in several ways:

export DANUBEDATA_API_TOKEN="your-api-token"
Provider Configuration
provider "danubedata" {
  api_token = "your-api-token"  # Not recommended for production
}

Quick Start

terraform {
  required_providers {
    danubedata = {
      source  = "AdrianSilaghi/danubedata"
      version = "~> 0.3"
    }
  }
}

provider "danubedata" {}

# Create an SSH key
resource "danubedata_ssh_key" "example" {
  name       = "my-ssh-key"
  public_key = file("~/.ssh/id_ed25519.pub")
}

# Create a VPS instance
resource "danubedata_vps" "example" {
  name        = "my-server"
  image       = "ubuntu-22.04"
  datacenter  = "fsn1"
  auth_method = "ssh_key"
  ssh_key_id  = danubedata_ssh_key.example.id

  # Optional: pick a plan. CPU, memory and storage follow from it and are
  # read-only; setting them directly fails at plan time.
  resource_profile = "micro_shared"
}

output "server_ip" {
  value = danubedata_vps.example.public_ip
}

Resources

Resource Description
danubedata_vps Manage VPS instances
danubedata_ssh_key Manage SSH keys
danubedata_firewall Manage firewalls with rules
danubedata_cache Manage Redis/Valkey/Dragonfly cache instances
danubedata_database Manage MySQL/PostgreSQL/MariaDB databases
danubedata_database_replica Manage database read replicas
danubedata_parameter_group Manage engine parameter groups
danubedata_storage_bucket Manage S3-compatible storage buckets
danubedata_storage_access_key Manage storage access keys
danubedata_serverless Manage serverless containers
danubedata_static_site Manage static sites
danubedata_static_site_domain Manage static site custom domains
danubedata_vps_snapshot Manage VPS snapshots
danubedata_database_snapshot Manage database snapshots
danubedata_cache_snapshot Manage cache snapshots

Data Sources

Data Source Description
danubedata_ssh_keys List SSH keys
danubedata_vps_images List available VPS images
danubedata_cache_providers List cache providers
danubedata_database_providers List database providers
danubedata_parameter_groups List parameter groups
danubedata_vpss List VPS instances
danubedata_databases List database instances
danubedata_caches List cache instances
danubedata_firewalls List firewalls
danubedata_serverless_containers List serverless containers
danubedata_static_sites List static sites
danubedata_storage_buckets List storage buckets
danubedata_storage_access_keys List storage access keys
danubedata_vps_snapshots List VPS snapshots
danubedata_cache_snapshots List cache snapshots
danubedata_database_snapshots List database snapshots

Examples

See the examples directory for complete configuration examples:

Development

Prerequisites
  • Go 1.21+
  • Terraform 1.0+
  • Make
Building
# Build the provider
make build

# Install to local Terraform plugins directory
make install

# Run tests
make test

# Run acceptance tests (requires API token)
make testacc
Running Acceptance Tests

Acceptance tests create real resources and may incur charges. Use a test account.

export DANUBEDATA_API_TOKEN="your-test-token"
make testacc
Documentation

The pages under docs/ are maintained by hand — there are no tfplugindocs templates and no //go:generate directives behind them. Edit the relevant Markdown file directly and keep it in step with the provider schema; running a generator over docs/ would discard the hand-written content.

To check a schema claim against the current build:

go build -o /tmp/terraform-provider-danubedata .
terraform providers schema -json | jq .

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

License

This provider is licensed under the Mozilla Public License 2.0. See LICENSE for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
acctest
Package acctest provides shared acceptance test utilities for the DanubeData provider.
Package acctest provides shared acceptance test utilities for the DanubeData provider.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL