Skip to content
This repository has been archived by the owner on Jul 30, 2023. It is now read-only.

marcusolsson/terraform-provider-serialized

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Terraform Provider for Serialized.IO

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published