Skip to content

Commit d4785b2

Browse files
committed
remove route id, bindplane can generate it
1 parent 3dc6519 commit d4785b2

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

provider/resource_configuration_v2.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,6 @@ func resourceConfigurationV2() *schema.Resource {
101101
ForceNew: false,
102102
Elem: &schema.Resource{
103103
Schema: map[string]*schema.Schema{
104-
"id": {
105-
Type: schema.TypeString,
106-
Required: true,
107-
ForceNew: false,
108-
Description: "The ID of the route.",
109-
},
110104
// TODO(jsirianni): Could be plural with
111105
// list or array. Provider would handle combining
112106
// them into string.
@@ -307,7 +301,6 @@ func resourceConfigurationV2Create(d *schema.ResourceData, meta any) error {
307301
routes := &model.Routes{}
308302
if rawRoutes := sourcesRaw["route"].([]any); v != nil {
309303
for _, r := range rawRoutes {
310-
id := r.(map[string]any)["id"].(string)
311304
telemetryType := r.(map[string]any)["telemetry_type"].(string)
312305
rawComponents := r.(map[string]any)["components"].([]any)
313306
components := []model.ComponentPath{}
@@ -318,17 +311,14 @@ func resourceConfigurationV2Create(d *schema.ResourceData, meta any) error {
318311
switch telemetryType {
319312
case "logs":
320313
routes.Logs = append(routes.Logs, model.Route{
321-
ID: id,
322314
Components: components,
323315
})
324316
case "metrics":
325317
routes.Metrics = append(routes.Metrics, model.Route{
326-
ID: id,
327318
Components: components,
328319
})
329320
case "traces":
330321
routes.Traces = append(routes.Traces, model.Route{
331-
ID: id,
332322
Components: components,
333323
})
334324
}

test/local/main.tf

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -294,28 +294,24 @@ resource "bindplane_configuration_v2" "configuration" {
294294
source {
295295
name = bindplane_source.otlp.name
296296
route {
297-
id = "0"
298297
telemetry_type = "logs"
299298
components = [
300299
"destinations/${bindplane_destination.datadog.id}"
301300
]
302301
}
303302
route {
304-
id = "1"
305303
telemetry_type = "metrics"
306304
components = [
307305
"destinations/${bindplane_destination.datadog.id}"
308306
]
309307
}
310308
route {
311-
id = "2"
312309
telemetry_type = "traces"
313310
components = [
314311
"destinations/${bindplane_destination.datadog.id}"
315312
]
316313
}
317314
route {
318-
id = "3"
319315
telemetry_type = "logs"
320316
components = [
321317
"destinations/${bindplane_destination.loki.id}"
@@ -330,23 +326,20 @@ resource "bindplane_configuration_v2" "configuration" {
330326
]
331327

332328
route {
333-
id = "0"
334329
telemetry_type = "logs"
335330
components = [
336331
"destinations/${bindplane_destination.custom.id}"
337332
]
338333
}
339334

340335
route {
341-
id = "1"
342336
telemetry_type = "logs"
343337
components = [
344338
"destinations/${bindplane_destination.google.id}"
345339
]
346340
}
347341

348342
route {
349-
id = "2"
350343
telemetry_type = "logs"
351344
components = [
352345
"destinations/${bindplane_destination.loki.id}"

0 commit comments

Comments
 (0)