terraform-provider-danubedata

command module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 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.1"
    }
  }
}
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.1"
    }
  }
}

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: specify resources
  cpu_cores      = 2
  memory_size_gb = 4
  storage_size_gb = 50
}

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_storage_bucket Manage S3-compatible storage buckets
danubedata_storage_access_key Manage storage access keys
danubedata_serverless Manage serverless containers
danubedata_vps_snapshot Manage VPS 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

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
Generating Documentation
make docs

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