Databases as configuration
Manage KiviDB Cloud databases and snapshots as configuration with the KiviDB Terraform provider: describe the database you want and review the plan before it is applied.
Describe the database you want. Terraform works out the difference, and the plan tells you what it is about to do before it does it.
A database, as a resource
terraform {
required_providers {
kividb = {
source = "kividbio/kividb"
version = "~> 0.5"
}
}
}
provider "kividb" {}
resource "kividb_instance" "cache" {
name = "orders-cache"
tier = "essentials"
cloud = "aws"
region = "us-east-1"
data_size_gb = 8
}A provider that tells you the truth
- One key, nothing else An API key in KIVIDB_API_KEY carries the organization and the role. There is no account id, region or endpoint to configure.
- Each change is its own operation A rename, a resize, a replica change and an upgrade each have their own rules. The provider routes every changed attribute to the operation that owns it.
- A revoked key fails early The key is checked when the provider is configured, so a bad key fails at plan, not halfway through an apply.
Start here
- Overview: Install, authenticate, and how the provider thinks.
- The instance resource: Every attribute, and what changing it does.
- Snapshots: Take and keep snapshots as resources.
- Recipes: Worked configurations for common setups.
Put your database in version control
Mint an API key in the console, add the provider, and run terraform plan.