The Terraform provider is generally available
Clusters can now be declared in Terraform rather than clicked into existence. The ClusterNest provider is out of preview: create, update and destroy OpenSearch clusters from the same repository as the rest of your infrastructure.
What it looks like
resource "clusternest_opensearch" "logs" {
name = "logs"
tier = "standard"
organization_id = 123
}
data "clusternest_opensearch_credentials" "logs" {
cluster_id = clusternest_opensearch.logs.id
}
output "opensearch_url" {
value = clusternest_opensearch.logs.opensearch_url
}
The endpoint and the credentials come back as outputs, so whatever consumes the cluster can be wired to it in the same apply rather than by someone copying a hostname out of the console.
Change the tier or the data node count, run terraform apply, and the cluster follows. Remove the block and it goes away. The provider reconciles against the API, so a cluster that drifted because somebody changed it in the console shows up in the next plan as a diff rather than as a surprise six months later.
Why this matters more than convenience
A cluster that exists only in a console is a cluster nobody can reproduce. When staging and production are two sets of clicks made on different days, they diverge, and the divergence is invisible until the thing that worked in staging doesn’t.
Putting the cluster in the same repository as the services that write to it also puts it under review. A tier change becomes a pull request with a person’s name on it.
Getting started
The provider documentation has the full resource reference and worked examples. Questions to hello@clusternest.com.