datastax / terraform-provider-astra

A project that allows DataStax Astra users to manage their full database lifecycle for Astra Serverless databases (built on Apache Cassandra(TM)) using Terraform
https://registry.terraform.io/providers/datastax/astra
Mozilla Public License 2.0
20 stars 23 forks source link

astra_available_regions data source should allow support for distinguishing vector kubes #387

Closed toptobes closed 6 months ago

toptobes commented 7 months ago

Hey there,

Using the "astra_available_regions" data source, there should be some way to distinguish between vector and generic serverless kubes, whether it be by:

  1. Allowing an option region_type = "vector" | "serverless", or (perhaps less idiomatically)
  2. Returning the region_type in each result object

Relevant DevOps API docs where it shows that in each result object, there's a region-type query param that may be set to filter by

Additionally, as addenda, it may be nice to (optionally?) check for the enabled fields in each result object to be set to true, as well as allow a cloud_provider field to have the data source itself filter by that (or even more filters)

emerkle826 commented 6 months ago

Thanks for reporting this. The linked PR adds the missing fields to the regions in the result object and gives you the ability to filter on region_type, cloud_provider and/or enabled status. It should be merged after review later today.

emerkle826 commented 6 months ago

Later than I hoped, but v2.3.2 released today should fix the issue