-
Notifications
You must be signed in to change notification settings - Fork 49
feat: Fabric stream resource and data sources #844
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
087abf5
Update Fabric Client config and update sdkv2 calls to it
thogarty eaf9224
Add equinix_fabric_stream resource and data sources
thogarty ccd6c8d
Add Equinix Fabric Stream Resource and Data Sources
thogarty f1cca20
Add acceptance tests to streams resource and data source
thogarty 2f8b5ae
Add docs for fabric stream resource and data sources
thogarty 34215ae
Finish stream resource and data source dev
thogarty d1646bd
Fix linter error; remove fmt.Sprintf
thogarty 28e84c8
Fix variable declaration and assignment linting errors
thogarty 955f9c0
Add test sweeper for stream resource
thogarty f485a2b
Update const to match Go styling guide and update tests for plan modi…
thogarty 2f03c65
Update reference to const timeout format
thogarty a8f8962
Add revive and stylecheck linters + update linting errors
thogarty 36a88c8
Remove styling additions to move it to a separate PR to avoid modific…
thogarty File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whitespace change in the linter config is tagging DRE for review; if you revert this change then you'll only need review/approval from @d-bhola.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait, I'm wrong; the changes to
config.goare technically shared, so that requires separate sign-off either way; taking care of that now.