equinix_fabric_stream_subscription(リソース)
Fabric V4 API互換リソースにより、Equinix Fabric Streamサブスクリプションの作成と管理が可能になります。
追加ドキュメント
- はじめに: https://docs.equinix.com/observability/streaming-data/integratewithsink/
- API: https://docs.equinix.com/api-catalog/fabricv4/#tag/Stream-Subscriptions
使用例
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>"
}
}
}
スキーマ
必須
description(String) 顧客が提供するストリームサブスクリプションの説明enabled(論理値) ストリーム購読有効状態name(String) 顧客提供のストリームサブスクリプション名sink(属性)エクイニクスストリームの契約者の詳細(ネストされたスキーマについては下記を参照)。stream_id(String) ストリームサブスクリプションの対象となるストリームの uuid。type(String) ストリームサブスクリプションリクエストのタイプ
オプション
event_selector(属性) ストリームサブスクリプションに含まれる/含まれないイベントのリスト (入れ子のスキーマは下記参照](#nestedatt--event_selector))metric_selector(属性) ストリーム・サブスクリプションに含める/含めないメトリクスのリスト (入れ子のスキーマは下記参照)(#nestedatt--metric_selector)timeouts(属性) (入れ子になったスキーマは以下を参照](#nestedatt--timeouts))
読み取り専用
change_log(属性) ストリームリソースの最後の変更の詳細 (入れ子になったスキーマは以下を参照](#nestedatt--change_log))href(文字列)ストリーム購読リソースのEquinix割り当てURIid(文字列) リ ソ ース の一意な識別子state(文字列) ストリームリソースのプロビジョニングステータスを表す値。uuid(文字列) ストリームサブスクリプションリソースのエクイニクス割り当て一意識別子
sinkの入れ子スキーマ
必須
type(String) 契約者のタイプ
オプション
batch_enabled(Boolean) データの一括配信を可能にするブール型スイッチbatch_size_max(数値) 有効な場合のバッチ配信の最大サイズbatch_wait_time_max(数値) バッチ配信を有効にした場合の最大待機時間credential(属性) 指定されたシンクタイプのアクセス詳細 (入れ子になったスキーマは下記参照](#nestedatt--sink--credential))host(String) 特定のデータストリーム契約製品の既知のホスト名。可変 URI と混同しないでください。settings(属性) ストリームサブスクリプションのシンク設定 (ネストされたスキーマは以下を参照](#nestedatt--sink--settings))uri(文字列) データストリームの公開到達可能な http エンドポイント宛先
sink.credentialの入れ子スキーマ
必須
type(文字列)渡されるクレデンシャルのタイプ
オプション
access_token(String) Authorization ヘッダー値として渡されます。api_key(String) Authorization ヘッダー値として渡されます。integration_key(String) Authorization ヘッダー値として渡されます。password(String) Authorization ヘッダー値として渡されます。username(String) Authorization ヘッダー値として渡されます。
sink.settingsの入れ子スキーマ
オプション
application_key(文字列)event_index(文字列)event_uri(文字列)format(文字列)metric_index(文字列)metric_uri(文字列)source(文字列)
event_selectorの入れ子スキーマ
必須
include(文字列のリスト) 含めるイベントのリスト
オプション
except(文字列のリスト) 除外するイベントのリスト
metric_selectorの入れ子スキーマ
必須
include(文字列のリスト) 含めるメ ト リ ッ ク の リ ス ト 。
オプション
except(文字列のリスト) 除外するメ ト リ ッ ク の リ ス ト 。
timeoutsの入れ子スキーマ
オプション
create(String) "30s "や "2h45m "などの数字と単位接尾辞で構成される期間として解析できる文字列。有効な時間単位は、"s" (秒)、"m" (分)、"h" (時間) です。delete(文字列) "30s "や "2h45m "などの数字と単位の接尾辞で構成される期間として解析できる文字列。有効な時間単位は、"s" (秒)、"m" (分)、"h" (時間) です。削除操作にタイムアウトを設定することは、破棄操作が発生する前に変更が状態に保存されている場合にのみ適用されます。read(文字列) "30s "や "2h45m "などの数字と単位の接尾辞で構成される期間として解析できる文字列。有効な時間単位は "s"(秒)、"m"(分)、"h"(時間)です。読み取り操作は、リフレッシュが有効になっている場合、リフレッシュまたはプランニング操作中に発生します。update(String) "30s "や "2h45m "などの数字と単位接尾辞で構成される期間として解析できる文字列。有効な時間単位は、"s" (秒)、"m" (分)、"h" (時間) です。
change_logの入れ子スキーマ
読み取り専用:
created_by(文字列) ストリームリソースの作成者のユーザー名。created_by_email(文字列) ストリームリソースの作成者の電子メール。created_by_full_name(文字列) ストリームリソースの作成者の法的名前。created_date_time(文字列) ストリームリソースの作成時間。deleted_by(文字列) ストリームリソースの削除者のユーザー名。deleted_by_email(文字列) ス ト リ ーム リ ソ ース の削除者の電子 メ ール。deleted_by_full_name(文字列) ス ト リ ーム リ ソ ース の削除者の正式名。deleted_date_time(文字列) ストリームリソースの削除時間。updated_by(文字列) ス ト リ ーム リ ソ ース の最終更新者のユーザー名。updated_by_email(文字列) ス ト リ ーム リ ソ ース の最終更新者の電子 メ ール。updated_by_full_name(文字列) ス ト リ ーム リ ソ ース の最終更新者の正式名。updated_date_time(文字列) ス ト リ ーム リ ソ ース の最終更新時刻。