Skip to content
Terraform Provider for Serialized.IO
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
README.md
main.go
provider.go
resource_projection.go
resource_reaction.go

README.md

Terraform Provider for Serialized.IO

Authenticating

provider "serialized" {
  access_key        = "..." # Can also be sourced from SERIALIZED_ACCESS_KEY.
  secret_access_key = "..." # Can also be sourced from SERIALIZED_SECRET_ACCESS_KEY.
}

Resources

serialized_projection

Creates a projection for Serialized.IO. For more information see the official documentation and API.

Example Usage

resource "serialized_projection" "default" {
  name = "orders"
  feed = "order"

  handlers = [
    {
      event_type = "OrderCancelledEvent"

      functions = [
        {
          function        = "inc"
          target_selector = "$.projection.orders[?]"
          event_selector  = "$.event[?]"
          target_filter   = "@.orderId == $.event.orderId"
          event_filter    = "@.orderAmount > 4000"
        },
      ]
    },
  ]
}

Argument Reference

The following arguments are supported:

  • name - (Required) A unique ID for the resource. Changing this forces a new resource to be created.

  • feed - (Required) The ID of the feed.

  • handlers - (Required) The event handlers.

serialized_reaction

Creates a reaction for Serialized.IO. For more information see the official documentation and API.

Example Usage

resource "serialized_reaction" "default" {
  name      = "payment-processed-email-reaction"
  feed      = "payment"
  reacts_on = "PaymentProcessed"

  cancels_on = [
    "OrderCanceledEvent",
  ]

  trigger_time_field = "my.event.data.field"
  offset             = "PT1H"

  action {
    action_type = "HTTP_POST"
  }
}

Argument Reference

The following arguments are supported:

  • name - (Required) A unique ID for the resource. Changing this forces a new resource to be created.

  • feed - (Required) The ID of the feed.

You can’t perform that action at this time.