Skip to content

Unable to attach destination functions #199

@kotenko-visible

Description

@kotenko-visible

Description

Destination functions are not compatible with segment_insert_function_instance

To Reproduce

Example Terraform code that triggers the issue:

resource "segment_function" "test" {
  code          = file("${path.module}/function.js")
  description   = "Test function"
  display_name  = "Test"
  logo_url      = "https://cdn.filepicker.io/api/file/RmPmpcBTQZKaFeGQrdG5"
  resource_type = "DESTINATION"
  settings = []
}

resource "segment_insert_function_instance" "test" {
  integration_id = segment_destination.this.id
  function_id    = segment_function.test.id
  name           = "test"
  enabled        = true
  settings       = []
}
│ Error: Unable to create Insert Function instance
│ 
│   with module.XXXXX.segment_insert_function_instance.this["XXXX"],
│   on modules/destination/main.tf line 41, in resource "segment_insert_function_instance" "this":
│   41: resource "segment_insert_function_instance" "this" {
│ 
│ 400 Bad Request
│ {
│   "errors": [
│     {
│       "type": "bad-request",
│       "message": "Insert function dfn_689dff94c6454e46XXXXXXX not found."
│     }
│   ]
│ }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions