MaterializeInc / terraform-provider-materialize

A Terraform provider for Materialize
https://registry.terraform.io/providers/MaterializeInc/materialize
Mozilla Public License 2.0
11 stars 8 forks source link

unify cluster alter commands #628

Closed jubrad closed 3 months ago

jubrad commented 3 months ago

Unifying cluster alter commands. This is a pre-req for adding graceful reconfiguration.

jubrad commented 3 months ago

Test this with the following setup:

./terraformrc

provider_installation {
  dev_overrides {
    "MaterializeInc/materialize" = "/Users/justin/go/bin/"
  }
  direct {}
}
terraform {
  required_providers {
    materialize = {
      source = "MaterializeInc/materialize"
    }
  }
}

provider "materialize" {
  password       = "dontlookatmypassworddood"
  default_region = "aws/us-east-1"
  database       = "materialize"
  cloud_endpoint = "https://api.staging.cloud.materialize.com"
  base_endpoint  = "https://admin.staging.cloud.materialize.com"
  endpoint       = "https://admin.staging.cloud.materialize.com"
}

resource "materialize_cluster" "test" {
  name               = "test"
  size               = "25cc"
  replication_factor = 2
}

Then changed the size/replication factor a few ways.. I can see in the sql lifecycle on the console that it ran successfully in a single statement, where using the latest release was multiple statements.

image