civo/terraform-provider-civo

Can't use loadbalancer data source without region being specified in provider

Xzelsius opened this issue · 2 comments

If I want to load informations about a loadbalancer like this

data "civo_loadbalancer" "ingress_nginx" {
  id = "d7bd61b3-4a8e-46d6-811c-33290b7d94d1"
}

it is necessary to specify the region in the provider config.

provider "civo" {
  token = var.token
  region = "LON1"
}

In my case I do prefer to not specify the region in the provider config.

Is there a way to work around this?
If not, what is your intended way to manage a multi region project from one Terraform workspace?

Hi @Xzelsius so far there is no solution for that, what we can do is add a region to the data source and in that way you can specify the region independent of the provider, will be like overwrite, I already working in this, I think the feature will be out today

@alejandrojnm That would be fantastic. Thank you!