Skip to main content

Terraform Provider v1.3.0

VeloDB Terraform Provider v1.3.0 adds per-node capacity controls, EBS and local NVMe cache selection, and warehouse placement-zone data. It also improves refresh behavior and warns before a plan deletes a virtual cluster.

Highlights​

Configure compute capacity per node​

You can configure vCPU count and cache capacity per node, along with the cluster's node count. These settings are available for velodb_cluster, a warehouse's initial_cluster, and the initial and additional clusters in both AWS BYOC modules.

This lets you size each node and the overall cluster separately. For example, three nodes with 8 vCPUs and 200 GB of cache each provide 24 total vCPUs and 600 GB of cache.

Choose EBS or local NVMe cache​

You can select EBS or local NVMe when creating node-based clusters. With local NVMe, the selected node package determines cache capacity, and Terraform reads the applied capacity back from the API.

Read configured warehouse zones​

The velodb_warehouses data source now exposes zone_map for SaaS and BYOC warehouses. Use the configured placement zones in Terraform instead of maintaining a separate list.

Review virtual-cluster deletion plans​

Terraform now warns during planning before deleting a virtual cluster. Review the warning because deletion ends virtual-cluster routing and automatic failover.

How to use it​

Configure per-node capacity​

Use node_vcpu for vCPUs per node, node_count for the number of nodes, and node_cache for EBS cache in GB per node. For example:

resource "velodb_cluster" "analytics" {
warehouse_id = var.warehouse_id
name = "analytics"
cluster_type = "COMPUTE"

node_vcpu = 8
node_count = 3
node_cache = 200
memory_per_vcpu = 8
}

Use the same capacity fields in a velodb_warehouse initial-cluster block and in the initial and additional cluster entries in the AWS BYOC modules.

Configure local NVMe​

Set cache_storage_type = 1 for local NVMe and omit node_cache. The node package determines cache capacity, which the provider reads back from the API.

resource "velodb_cluster" "local_nvme" {
warehouse_id = var.warehouse_id
name = "local_worker"
cluster_type = "COMPUTE"
cache_storage_type = 1
node_vcpu = 4
node_count = 2
}

Read configured placement zones​

Use zone_map to get the availability zones configured for a warehouse:

data "velodb_warehouses" "selected" {
warehouse_id = var.warehouse_id
}

output "placement_zones" {
value = keys(coalesce(
one(data.velodb_warehouses.selected.warehouses).zone_map,
tomap({})
))
}

The map keys are zone IDs and its values are display names. If the API omits the map, such as for a single-availability-zone warehouse, zone_map is null.

For more information, see the VeloDB Terraform provider documentation.

Bug fixes​

  • Distinguish deleted resources from access errors. When refresh confirms a warehouse or cluster no longer exists with HTTP 404, Terraform removes it from state. An HTTP 403 now stops refresh and preserves state, so an access denial is not mistaken for a deleted resource.
  • Align memory configuration with the Management API. memory_per_vcpu now uses the API's corresponding field and reads back the applied value, reducing configuration drift.
  • Validate local NVMe cache settings during planning. Terraform rejects node_cache when local NVMe capacity is determined by the node package, rather than allowing an ignored setting to disagree with state.

Upgrade notes​

  • Use the provider source velodb-dev/velodb and pin version 1.3.0 in required_providers.
  • For new configurations, use memory_per_vcpu. Existing configurations can replace ratio with memory_per_vcpu using the same value.
  • Change node_count in a separate apply from changes to node_vcpu or node_cache.
  • For local NVMe, set cache_storage_type = 1 and omit node_cache. Cache storage type is selected at creation and cannot be changed in place.
  • Replace the old cache_type field with cache_storage_type in resources and BYOC module inputs. The values remain 0 for EBS and 1 for local NVMe. Back up state and review the plan because Terraform does not automatically migrate the old state attribute or module snapshot key.

See also​

Enter to send · Shift+Enter for a new line