Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Fabric stream subscription #864

Merged
merged 19 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/fabric_acctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ jobs:
TF_ACC_FABRIC_CONNECTIONS_TEST_DATA: ${{ secrets.TF_ACC_FABRIC_CONNECTIONS_TEST_DATA }}
TF_ACC_FABRIC_DEDICATED_PORTS: ${{ secrets.TF_ACC_FABRIC_DEDICATED_PORTS }}
TF_ACC_FABRIC_MARKET_PLACE_SUBSCRIPTION_ID: ${{ secrets.TF_ACC_FABRIC_MARKET_PLACE_SUBSCRIPTION_ID }}
TF_ACC_FABRIC_STREAM_TEST_DATA: ${{ secrets.TF_ACC_FABRIC_STREAM_TEST_DATA }}
EQUINIX_API_CLIENTID: ${{ secrets.EQUINIX_API_CLIENTID_PFCR }}
EQUINIX_API_CLIENTSECRET: ${{ secrets.EQUINIX_API_CLIENTSECRET_PFCR }}
METAL_AUTH_TOKEN: ${{ secrets.METAL_AUTH_TOKEN }}
Expand Down
131 changes: 131 additions & 0 deletions docs/data-sources/fabric_stream_subscription.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
---
subcategory: "Fabric"
---

# equinix_fabric_stream_subscription (Data Source)

Fabric V4 API compatible data source that allows user to fetch Equinix Fabric Stream Subscription by Stream Id and Subscription Id

Additional Documentation:
* Getting Started: https://docs.equinix.com/en-us/Content/KnowledgeCenter/Fabric/GettingStarted/Integrating-with-Fabric-V4-APIs/IntegrateWithSink.htm
* API: https://developer.equinix.com/catalog/fabricv4#tag/Stream-Subscriptions

## Example Usage

```terraform
data "equinix_fabric_stream_subscription" "by_ids" {
stream_id = "<stream_id>"
subscription_id = "<subscription_id>"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `stream_id` (String) The uuid of the stream that is the target of the stream subscription
- `subscription_id` (String) The uuid of the stream subscription

### Read-Only

- `change_log` (Attributes) Details of the last change on the stream resource (see [below for nested schema](#nestedatt--change_log))
- `description` (String) Customer-provided stream subscription description
- `enabled` (Boolean) Stream subscription enabled status
- `event_selector` (Attributes) Lists of events to be included/excluded on the stream subscription (see [below for nested schema](#nestedatt--event_selector))
- `filters` (Attributes List) List of filters to apply to the stream subscription selectors. Maximum of 8. All will be AND'd together with 1 of the 8 being a possible OR group of 3 (see [below for nested schema](#nestedatt--filters))
- `href` (String) Equinix assigned URI of the stream subscription resource
- `id` (String) The unique identifier of the resource
- `metric_selector` (Attributes) Lists of metrics to be included/excluded on the stream subscription (see [below for nested schema](#nestedatt--metric_selector))
- `name` (String) Customer-provided stream subscription name
- `sink` (Attributes) The details of the subscriber to the Equinix Stream (see [below for nested schema](#nestedatt--sink))
- `state` (String) Value representing provisioning status for the stream resource
- `type` (String) Type of the stream subscription request
- `uuid` (String) Equinix assigned unique identifier of the stream subscription resource

<a id="nestedatt--change_log"></a>
### Nested Schema for `change_log`

Read-Only:

- `created_by` (String) User name of creator of the stream resource
- `created_by_email` (String) Email of creator of the stream resource
- `created_by_full_name` (String) Legal name of creator of the stream resource
- `created_date_time` (String) Creation time of the stream resource
- `deleted_by` (String) User name of deleter of the stream resource
- `deleted_by_email` (String) Email of deleter of the stream resource
- `deleted_by_full_name` (String) Legal name of deleter of the stream resource
- `deleted_date_time` (String) Deletion time of the stream resource
- `updated_by` (String) User name of last updater of the stream resource
- `updated_by_email` (String) Email of last updater of the stream resource
- `updated_by_full_name` (String) Legal name of last updater of the stream resource
- `updated_date_time` (String) Last update time of the stream resource


<a id="nestedatt--event_selector"></a>
### Nested Schema for `event_selector`

Read-Only:

- `except` (List of String) List of events to exclude
- `include` (List of String) List of events to include


<a id="nestedatt--filters"></a>
### Nested Schema for `filters`

Read-Only:

- `operator` (String) Operation applied to the values of the filter
- `or` (Boolean) Boolean value to specify if this filter is a part of the OR group. Has a maximum of 3 and only counts for 1 of the 8 possible filters
- `property` (String) Property to apply the filter to
- `values` (List of String) List of values to apply the operation to for the specified property


<a id="nestedatt--metric_selector"></a>
### Nested Schema for `metric_selector`

Read-Only:

- `except` (List of String) List of metrics to exclude
- `include` (List of String) List of metrics to include


<a id="nestedatt--sink"></a>
### Nested Schema for `sink`

Read-Only:

- `batch_enabled` (Boolean) Boolean switch enabling batch delivery of data
- `batch_size_max` (Number) Maximum size of the batch delivery if enabled
- `batch_wait_time_max` (Number) Maximum time to wait for batch delivery if enabled
- `credential` (Attributes) Access details for the specified sink type (see [below for nested schema](#nestedatt--sink--credential))
- `host` (String) Known hostname of certain data stream subscription products. Not to be confused with a variable URI
- `settings` (Attributes) Stream subscription sink settings (see [below for nested schema](#nestedatt--sink--settings))
- `type` (String) Type of the subscriber
- `uri` (String) Publicly reachable http endpoint destination for data stream

<a id="nestedatt--sink--credential"></a>
### Nested Schema for `sink.credential`

Read-Only:

- `access_token` (String) Passed as Authorization header value
- `api_key` (String) Passed as Authorization header value
- `integration_key` (String) Passed as Authorization header value
- `password` (String) Passed as Authorization header value
- `type` (String) Type of the credential being passed
- `username` (String) Passed as Authorization header value


<a id="nestedatt--sink--settings"></a>
### Nested Schema for `sink.settings`

Read-Only:

- `application_key` (String)
- `event_index` (String)
- `event_uri` (String)
- `metric_index` (String)
- `metric_uri` (String)
- `source` (String)
156 changes: 156 additions & 0 deletions docs/data-sources/fabric_stream_subscriptions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
---
subcategory: "Fabric"
---

# equinix_fabric_stream_subscriptions (Data Source)

Fabric V4 API compatible data source that allows user to fetch Equinix Fabric Stream Subscriptions with pagination

Additional Documentation:
* Getting Started: https://docs.equinix.com/en-us/Content/KnowledgeCenter/Fabric/GettingStarted/Integrating-with-Fabric-V4-APIs/IntegrateWithSink.htm
* API: https://developer.equinix.com/catalog/fabricv4#tag/Stream-Subscriptions

## Example Usage

```terraform
data "equinix_fabric_stream_subscriptions" "all" {
stream_id = "<stream_id>"
pagination = {
limit = 10
offset = 0
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `pagination` (Attributes) Pagination details for the returned streams list (see [below for nested schema](#nestedatt--pagination))
- `stream_id` (String) The uuid of the stream that is the target of the stream subscription

### Read-Only

- `data` (Attributes List) Returned list of stream objects (see [below for nested schema](#nestedatt--data))
- `id` (String) The unique identifier of the resource

<a id="nestedatt--pagination"></a>
### Nested Schema for `pagination`

Optional:

- `limit` (Number) Maximum number of search results returned per page. Number must be between 1 and 100, and the default is 20
- `offset` (Number) Index of the first item returned in the response. The default is 0

Read-Only:

- `next` (String) The URL relative to the next item in the response
- `previous` (String) The URL relative to the previous item in the response
- `total` (Number) The total number of streams available to the user making the request


<a id="nestedatt--data"></a>
### Nested Schema for `data`

Read-Only:

- `change_log` (Attributes) Details of the last change on the stream resource (see [below for nested schema](#nestedatt--data--change_log))
- `description` (String) Customer-provided stream subscription description
- `enabled` (Boolean) Stream subscription enabled status
- `event_selector` (Attributes) Lists of events to be included/excluded on the stream subscription (see [below for nested schema](#nestedatt--data--event_selector))
- `filters` (Attributes List) List of filters to apply to the stream subscription selectors. Maximum of 8. All will be AND'd together with 1 of the 8 being a possible OR group of 3 (see [below for nested schema](#nestedatt--data--filters))
- `href` (String) Equinix assigned URI of the stream subscription resource
- `metric_selector` (Attributes) Lists of metrics to be included/excluded on the stream subscription (see [below for nested schema](#nestedatt--data--metric_selector))
- `name` (String) Customer-provided stream subscription name
- `sink` (Attributes) The details of the subscriber to the Equinix Stream (see [below for nested schema](#nestedatt--data--sink))
- `state` (String) Value representing provisioning status for the stream resource
- `type` (String) Type of the stream subscription request
- `uuid` (String) Equinix assigned unique identifier of the stream subscription resource

<a id="nestedatt--data--change_log"></a>
### Nested Schema for `data.change_log`

Read-Only:

- `created_by` (String) User name of creator of the stream resource
- `created_by_email` (String) Email of creator of the stream resource
- `created_by_full_name` (String) Legal name of creator of the stream resource
- `created_date_time` (String) Creation time of the stream resource
- `deleted_by` (String) User name of deleter of the stream resource
- `deleted_by_email` (String) Email of deleter of the stream resource
- `deleted_by_full_name` (String) Legal name of deleter of the stream resource
- `deleted_date_time` (String) Deletion time of the stream resource
- `updated_by` (String) User name of last updater of the stream resource
- `updated_by_email` (String) Email of last updater of the stream resource
- `updated_by_full_name` (String) Legal name of last updater of the stream resource
- `updated_date_time` (String) Last update time of the stream resource


<a id="nestedatt--data--event_selector"></a>
### Nested Schema for `data.event_selector`

Read-Only:

- `except` (List of String) List of events to exclude
- `include` (List of String) List of events to include


<a id="nestedatt--data--filters"></a>
### Nested Schema for `data.filters`

Read-Only:

- `operator` (String) Operation applied to the values of the filter
- `or` (Boolean) Boolean value to specify if this filter is a part of the OR group. Has a maximum of 3 and only counts for 1 of the 8 possible filters
- `property` (String) Property to apply the filter to
- `values` (List of String) List of values to apply the operation to for the specified property


<a id="nestedatt--data--metric_selector"></a>
### Nested Schema for `data.metric_selector`

Read-Only:

- `except` (List of String) List of metrics to exclude
- `include` (List of String) List of metrics to include


<a id="nestedatt--data--sink"></a>
### Nested Schema for `data.sink`

Read-Only:

- `batch_enabled` (Boolean) Boolean switch enabling batch delivery of data
- `batch_size_max` (Number) Maximum size of the batch delivery if enabled
- `batch_wait_time_max` (Number) Maximum time to wait for batch delivery if enabled
- `credential` (Attributes) Access details for the specified sink type (see [below for nested schema](#nestedatt--data--sink--credential))
- `host` (String) Known hostname of certain data stream subscription products. Not to be confused with a variable URI
- `settings` (Attributes) Stream subscription sink settings (see [below for nested schema](#nestedatt--data--sink--settings))
- `type` (String) Type of the subscriber
- `uri` (String) Publicly reachable http endpoint destination for data stream

<a id="nestedatt--data--sink--credential"></a>
### Nested Schema for `data.sink.credential`

Read-Only:

- `access_token` (String) Passed as Authorization header value
- `api_key` (String) Passed as Authorization header value
- `integration_key` (String) Passed as Authorization header value
- `password` (String) Passed as Authorization header value
- `type` (String) Type of the credential being passed
- `username` (String) Passed as Authorization header value


<a id="nestedatt--data--sink--settings"></a>
### Nested Schema for `data.sink.settings`

Read-Only:

- `application_key` (String)
- `event_index` (String)
- `event_uri` (String)
- `metric_index` (String)
- `metric_uri` (String)
- `source` (String)
Loading
Loading