If you don't explicitly specify tenants in your resource definition, the "terraform plan" works & creates the correct plan, but "terraform apply" fails:
+ table_type = "OFFLINE"
+ tenants = {}
}
Plan: 2 to add, 0 to change, 0 to destroy.
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Saved the plan to: tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "tfplan"
➜ tables git:(main) ✗ terraform apply "tfplan"
pinot_schema.realtime_table_schema: Creating...
pinot_schema.realtime_table_schema: Creation complete after 0s
pinot_table.realtime_table: Creating...
╷
│ Error: Create Failed: Unable to create table
│
│ with pinot_table.realtime_table,
│ on main.tf line 127, in resource "pinot_table" "realtime_table":
│ 127: resource "pinot_table" "realtime_table" {
│
│ client: request failed: status 400
│ {"code":400,"error":"Invalid table config for table realtime_ethereum_mainnet_block_headers_OFFLINE: Failed to find instances with tag: _BROKER for table: realtime_ethereum_mainnet_block_headers_OFFLINE"}
Whereas if you create a table using curl/REST API calls and having empty tenants, it works. IMHO the provider should behave the same as the REST API in this case.
If you don't explicitly specify tenants in your resource definition, the "terraform plan" works & creates the correct plan, but "terraform apply" fails:
Whereas if you create a table using curl/REST API calls and having empty tenants, it works. IMHO the provider should behave the same as the REST API in this case.