equinix_fabric_stream_subscription (Resource)
Fabric V4 API compatible resource allows creation and management of Equinix Fabric Stream Subscriptions
Additional Documentation:
- Getting Started: https://docs.equinix.com/observability/streaming-data/integratewithsink/
- API: https://docs.equinix.com/api-catalog/fabricv4/#tag/Stream-Subscriptions
Example Usage
resource "equinix_fabric_stream_subscription" "SPLUNK" {
type = "STREAM_SUBSCRIPTION"
name = "<name>"
description = "<description>"
stream_id = "<stream_id>"
enabled = true
event_selector = {
include = ["equinix.fabric.connection.*"]
}
metric_selector = {
include = ["equinix.fabric.connection.*"]
}
sink = {
type = "SPLUNK_HEC"
uri = "<splunk_uri>"
settings = {
event_index = "<splunk_event_index>"
metric_index = "<splunk_metric_index>"
source = "<splunk_source>"
}
credential = {
type = "ACCESS_TOKEN"
access_token = "<splunk_access_token>"
}
}
}
resource "equinix_fabric_stream_subscription" "SLACK" {
type = "STREAM_SUBSCRIPTION"
name = "<name>"
description = "<description>"
stream_id = "<stream_id>"
enabled = true
sink = {
type = "SLACK"
uri = "<slack_uri>"
}
}
resource "equinix_fabric_stream_subscription" "PAGER_DUTY" {
type = "STREAM_SUBSCRIPTION"
name = "<name>"
description = "<description>"
stream_id = "<stream_id>"
enabled = true
sink = {
type = "PAGERDUTY"
host = "<pager_duty_host"
settings = {
change_uri = "<pager_duty_change_uri>"
alert_uri = "<pager_duty_alert_uri>"
}
credential = {
type = "INTEGRATION_KEY"
integration_key = "<pager_duty_integration_key>"
}
}
}
resource "equinix_fabric_stream_subscription" "DATADOG" {
type = "STREAM_SUBSCRIPTION"
name = "<name>"
description = "<description>"
stream_id = "<stream_id>"
enabled = true
sink = {
type = "DATADOG"
host = "<datadog_host>"
settings = {
source = "Equinix"
application_key = "<datadog_application_key>"
event_uri = "<datadog_event_uri>"
metric_uri = "<datadog_metric_uri>"
}
credential = {
type = "API_KEY"
api_key = "<datadog_api_key>"
}
}
}
resource "equinix_fabric_stream_subscription" "MSTEAMS" {
type = "STREAM_SUBSCRIPTION"
name = "<name>"
description = "<description>"
stream_id = "<stream_id>"
enabled = true
sink = {
type = "TEAMS"
uri = "<msteams_uri>"
}
}
resource "equinix_fabric_stream_subscription" "servicenow" {
type = "STREAM_SUBSCRIPTION"
name = "<name>"
description = "<description>"
stream_id = "<stream_id>"
enabled = true
sink = {
type = "SERVICENOW"
host = "<servicenow_host>"
settings = {
source = "Equinix"
}
credential = {
type = "USERNAME_PASSWORD"
username = "<servicenow_username>"
password = "<servicenow_password>"
}
}
}
resource "equinix_fabric_stream_subscription" "webhook" {
type = "STREAM_SUBSCRIPTION"
name = "<name>"
description = "<description>"
stream_id = "<stream_id>"
enabled = true
sink = {
type = "WEBHOOK"
settings = {
format = "<webhook_format>"
event_uri = "<webhook_event_uri>"
metric_uri = "<webhook_metric_uri>"
}
}
}
resource "equinix_fabric_stream_subscription" "grafana" {
type = "STREAM_SUBSCRIPTION"
name = "<name>"
description = "<description>"
stream_id = "<stream_id>"
enabled = true
sink = {
type = "WEBHOOK"
settings = {
format = "OPENTELEMETRY"
event_uri = "<grafana_event_uri>"
metric_uri = "<grafana_metric_uri>"
}
}
}
Schema
Required
description(String) Customer-provided stream subscription descriptionenabled(Boolean) Stream subscription enabled statusname(String) Customer-provided stream subscription namesink(Attributes) The details of the subscriber to the Equinix Stream (see below for nested schema)stream_id(String) The uuid of the stream that is the target of the stream subscriptiontype(String) Type of the stream subscription request
Optional
event_selector(Attributes) Lists of events to be included/excluded on the stream subscription (see below for nested schema)metric_selector(Attributes) Lists of metrics to be included/excluded on the stream subscription (see below for nested schema)timeouts(Attributes) (see below for nested schema)
Read-Only
change_log(Attributes) Details of the last change on the stream resource (see below for nested schema)href(String) Equinix assigned URI of the stream subscription resourceid(String) The unique identifier of the resourcestate(String) Value representing provisioning status for the stream resourceuuid(String) Equinix assigned unique identifier of the stream subscription resource
Nested Schema for sink
Required:
type(String) Type of the subscriber
Optional:
batch_enabled(Boolean) Boolean switch enabling batch delivery of databatch_size_max(Number) Maximum size of the batch delivery if enabledbatch_wait_time_max(Number) Maximum time to wait for batch delivery if enabledcredential(Attributes) Access details for the specified sink type (see below for nested schema)host(String) Known hostname of certain data stream subscription products. Not to be confused with a variable URIsettings(Attributes) Stream subscription sink settings (see below for nested schema)uri(String) Publicly reachable http endpoint destination for data stream
Nested Schema for sink.credential
Required:
type(String) Type of the credential being passed
Optional:
access_token(String) Passed as Authorization header valueapi_key(String) Passed as Authorization header valueintegration_key(String) Passed as Authorization header valuepassword(String) Passed as Authorization header valueusername(String) Passed as Authorization header value
Nested Schema for sink.settings
Optional:
application_key(String)event_index(String)event_uri(String)format(String)metric_index(String)metric_uri(String)source(String)
Nested Schema for event_selector
Required:
include(List of String) List of events to include
Optional:
except(List of String) List of events to exclude
Nested Schema for metric_selector
Required:
include(List of String) List of metrics to include
Optional:
except(List of String) List of metrics to exclude
Nested Schema for timeouts
Optional:
create(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).delete(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.read(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.update(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Nested Schema for change_log
Read-Only:
created_by(String) User name of creator of the stream resourcecreated_by_email(String) Email of creator of the stream resourcecreated_by_full_name(String) Legal name of creator of the stream resourcecreated_date_time(String) Creation time of the stream resourcedeleted_by(String) User name of deleter of the stream resourcedeleted_by_email(String) Email of deleter of the stream resourcedeleted_by_full_name(String) Legal name of deleter of the stream resourcedeleted_date_time(String) Deletion time of the stream resourceupdated_by(String) User name of last updater of the stream resourceupdated_by_email(String) Email of last updater of the stream resourceupdated_by_full_name(String) Legal name of last updater of the stream resourceupdated_date_time(String) Last update time of the stream resource