-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend integration tests to run in two regions #614
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me! Unfortunate that users with multiple regions will have to duplicate a lot of their objects, but doesn't seem like there's a terraform-only solution for this.
If they're looking to create the same objects in multiple regions, they can use Terraform's take on loops ( |
Indeed, this can be done with a loop: variable "regions" {
type = list(string)
default = ["aws/us-west-2", "aws/us-east-1"]
}
resource "materialize_cluster" "multi_region_clusters" {
count = length(var.regions)
name = "cluster"
comment = "Cluster in ${var.regions[count.index]}"
region = var.regions[count.index]
} My idea behind the test here is to make sure that users can rely on the default region in their provider configuration, but also be able to spin up ad-hoc resources in different regions by overriding the default one in the resources themselves. I think that in most cases, people only manage resources in 1 region, and if they wanted to replicate their whole setup in another region they would just change the default region provider configuration value. |
Something like that, but I could still see it getting messy with the
Was what I was thinking of! |
Fixes #560