-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Fabric stream resource and data sources (#844)
Using terraform-plugin-framework; added the following: * equinix_fabric_stream resource * equinix_fabric_stream data source * equinix_fabric_streams data source Included automated testing and docs creation leveraging description on schemas NOTE: Fixed usage of context within Fabric client creations and updated all usages in SDKv2 as well
- Loading branch information
Showing
41 changed files
with
1,617 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,4 @@ linters: | |
- unused | ||
issues: | ||
max-issues-per-linter: 0 | ||
max-same-issues: 0 | ||
max-same-issues: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
subcategory: "Fabric" | ||
--- | ||
|
||
# equinix_fabric_stream (Data Source) | ||
|
||
Fabric V4 API compatible data resource that allow user to fetch Equinix Fabric Stream by UUID | ||
|
||
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/Streams | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "equinix_fabric_stream" "data_stream" { | ||
stream_id = "<uuid_of_stream>" | ||
} | ||
output "stream_state" { | ||
value = data.equinix_fabric_stream.data_stream.state | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `stream_id` (String) The uuid of the stream this data source should retrieve | ||
|
||
### Read-Only | ||
|
||
- `assets_count` (Number) Count of the streaming assets attached to the stream resource | ||
- `change_log` (Attributes) Details of the last change on the stream resource (see [below for nested schema](#nestedatt--change_log)) | ||
- `description` (String) Customer-provided description of the stream resource | ||
- `href` (String) Equinix auto generated URI to the stream resource in Equinix Portal | ||
- `id` (String) The unique identifier of the resource | ||
- `name` (String) Customer-provided name of the stream resource | ||
- `project` (Attributes) Equinix Project attribute object (see [below for nested schema](#nestedatt--project)) | ||
- `state` (String) Value representing provisioning status for the stream resource | ||
- `stream_subscriptions_count` (Number) Count of the client subscriptions on the stream resource | ||
- `type` (String) Equinix defined Streaming Type | ||
- `uuid` (String) Equinix-assigned unique id for the stream 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--project"></a> | ||
### Nested Schema for `project` | ||
|
||
Read-Only: | ||
|
||
- `project_id` (String) Equinix Subscriber-assigned project ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
--- | ||
subcategory: "Fabric" | ||
--- | ||
|
||
# equinix_fabric_streams (Data Source) | ||
|
||
Fabric V4 API compatible data resource that allow user to fetch Equinix Fabric Streams with pagination details | ||
|
||
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/Streams | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "equinix_fabric_streams" "data_streams" { | ||
pagination = { | ||
limit = 2 | ||
offset = 1 | ||
} | ||
} | ||
output "number_of_returned_streams" { | ||
value = length(data.equinix_fabric_streams.data_streams.data) | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `pagination` (Attributes) Pagination details for the returned streams list (see [below for nested schema](#nestedatt--pagination)) | ||
|
||
### 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: | ||
|
||
- `assets_count` (Number) Count of the streaming assets attached to the stream resource | ||
- `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 description of the stream resource | ||
- `href` (String) Equinix auto generated URI to the stream resource in Equinix Portal | ||
- `name` (String) Customer-provided name of the stream resource | ||
- `project` (Attributes) Equinix Project attribute object (see [below for nested schema](#nestedatt--data--project)) | ||
- `state` (String) Value representing provisioning status for the stream resource | ||
- `stream_subscriptions_count` (Number) Count of the client subscriptions on the stream resource | ||
- `type` (String) Equinix defined Streaming Type | ||
- `uuid` (String) Equinix-assigned unique id for the stream 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--project"></a> | ||
### Nested Schema for `data.project` | ||
|
||
Read-Only: | ||
|
||
- `project_id` (String) Equinix Subscriber-assigned project ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
--- | ||
subcategory: "Fabric" | ||
--- | ||
|
||
# equinix_fabric_stream (Resource) | ||
|
||
Fabric V4 API compatible resource allows creation and management of Equinix Fabric Stream | ||
|
||
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/Streams | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "equinix_fabric_stream" "new_stream" { | ||
type = "TELEMETRY_STREAM" | ||
name = "<name_of_stream_resource>" | ||
description = "<description_of_stream_resource>" | ||
project = { | ||
project_id = "<destination_project_id_for_stream" | ||
} | ||
} | ||
output "stream_state" { | ||
value = equinix_fabric_stream.new_stream.state | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `description` (String) Customer-provided description of the stream resource | ||
- `name` (String) Customer-provided name of the stream resource | ||
- `type` (String) Equinix defined Streaming Type | ||
|
||
### Optional | ||
|
||
- `project` (Attributes) Equinix Project attribute object (see [below for nested schema](#nestedatt--project)) | ||
- `timeouts` (Attributes) (see [below for nested schema](#nestedatt--timeouts)) | ||
|
||
### Read-Only | ||
|
||
- `assets_count` (Number) Count of the streaming assets attached to the stream resource | ||
- `change_log` (Attributes) Details of the last change on the stream resource (see [below for nested schema](#nestedatt--change_log)) | ||
- `href` (String) Equinix auto generated URI to the stream resource in Equinix Portal | ||
- `id` (String) The unique identifier of the resource | ||
- `state` (String) Value representing provisioning status for the stream resource | ||
- `stream_subscriptions_count` (Number) Count of the client subscriptions on the stream resource | ||
- `uuid` (String) Equinix-assigned unique id for the stream resource | ||
|
||
<a id="nestedatt--project"></a> | ||
### Nested Schema for `project` | ||
|
||
Required: | ||
|
||
- `project_id` (String) Equinix Subscriber-assigned project ID | ||
|
||
|
||
<a id="nestedatt--timeouts"></a> | ||
### Nested Schema for `timeouts` | ||
|
||
Optional: | ||
|
||
- `create` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) 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](https://pkg.go.dev/time#ParseDuration) 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](https://pkg.go.dev/time#ParseDuration) 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](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). | ||
|
||
|
||
<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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.