azaurus1 / terraform-provider-pinot

A terraform provider for Apache Pinot
https://registry.terraform.io/providers/azaurus1/pinot/latest
Mozilla Public License 2.0
8 stars 1 forks source link

Deploy schema from a json file #99

Closed piby180 closed 4 weeks ago

piby180 commented 1 month ago

Hi, Thanks for this providor! Is it possible to deploy schema from json file instead?

azaurus1 commented 1 month ago

Hi @piby180, You can use jsondecode to read your json file into terraform and then parse it.

There isn't currently an example for this with schemas, but take a look at the examples for tables: https://github.com/azaurus1/terraform-provider-pinot/blob/main/examples/tables/main.tf, where the realtime_table_example.json file is decoded and then used to define the table resource.

piby180 commented 1 month ago

Thanks! I probably then have to create a module with this logic and reuse it.

In the end we have 100s of tables and I want to deploy both table and schema by just providing path to json file.

azaurus1 commented 4 weeks ago

Sure no worries, and feel free to reach out with any questions