cockroachdb / terraform-provider-cockroach

Terraform provider for CockroachDB Cloud
Apache License 2.0
55 stars 10 forks source link

fix error when primary attribute is specified in multiple regions #178

Closed andy-kimball closed 4 months ago

andy-kimball commented 4 months ago

Previously, the TF provider raised an error when the primary attribute was specified in multiple regions, e.g.:

regions = [ { name = "eu-west-1" primary = true }, { name = "eu-west2" primary = false }, { name = "ap-south-1" primary = false }, ]

This PR fixes that by adding some custom validation logic rather than using the built-in config validators.

Fixes: CC-27160

Commit checklist

andy-kimball commented 4 months ago

TFTR