From 5cc791292dcc98abb74df2aeb838dfd2bb0f9f2e Mon Sep 17 00:00:00 2001 From: srushti-patl Date: Tue, 10 Sep 2024 11:02:39 -0700 Subject: [PATCH] feat: Adding docs for fabric marketplace data source --- .../fabric_market_place_subscription.md | 90 +++++++++++++++++++ .../data-source.tf | 18 ++++ 2 files changed, 108 insertions(+) create mode 100644 docs/data-sources/fabric_market_place_subscription.md create mode 100644 examples/data-sources/equinix_fabric_market_place_subscription/data-source.tf diff --git a/docs/data-sources/fabric_market_place_subscription.md b/docs/data-sources/fabric_market_place_subscription.md new file mode 100644 index 000000000..8fb4fa362 --- /dev/null +++ b/docs/data-sources/fabric_market_place_subscription.md @@ -0,0 +1,90 @@ +--- +subcategory: "Fabric" +--- + +# equinix_fabric_market_place_subscription (Data Source) + +Fabric V4 API compatible data resource that allow user to fetch Marketplace Subscription detail for a given UUID + +## Example Usage + +```terraform +data "equinix_fabric_market_place_subscription" "subscription-test" { + uuid = "" +} +output "id" { + value = data.equinix_fabric_market_place_subscription.subscription-test.id +} +output "status" { + value = data.equinix_fabric_market_place_subscription.subscription-test.status +} +output "marketplace" { + value = data.equinix_fabric_market_place_subscription.subscription-test.marketplace +} +output "offer_type" { + value = data.equinix_fabric_market_place_subscription.subscription-test.offer_type +} +output "is_auto_renew" { + value = data.equinix_fabric_market_place_subscription.subscription-test.is_auto_renew +} +``` + + +## Schema + +### Required + +- `uuid` (String) Equinix-assigned marketplace identifier + +### Optional + +- `entitlements` (Block List) Subscription entitlements (see [below for nested schema](#nestedblock--entitlements)) +- `is_auto_renew` (Boolean) Information about subscription auto renewal +- `offer_type` (String) Marketplace Offer Type like; PUBLIC, PRIVATE_OFFER +- `trial` (Block Set, Max: 1) Subscription Trial (see [below for nested schema](#nestedblock--trial)) + +### Read-Only + +- `href` (String) Subscription URI information +- `id` (String) The ID of this resource. +- `marketplace` (String) Marketplace like; AWS, GCP, AZURE, REDHAT +- `status` (String) Subscription Status like; ACTIVE, EXPIRED, CANCELLED, GRACE_PERIOD + + +### Nested Schema for `entitlements` + +Optional: + +- `asset` (Block Set, Max: 1) Asset information (see [below for nested schema](#nestedblock--entitlements--asset)) +- `quantity_available` (Number) Available Quantity +- `quantity_consumed` (Number) Consumed Quantity +- `quantity_entitled` (Number) Entitled Quantity +- `uuid` (String) Subscription Entitlement Id + + +### Nested Schema for `entitlements.asset` + +Required: + +- `package` (Block Set, Min: 1, Max: 1) Fabric Cloud Router Package Type (see [below for nested schema](#nestedblock--entitlements--asset--package)) + +Optional: + +- `type` (String) Defines the FCR type like; XF_ROUTER + + +### Nested Schema for `entitlements.asset.package` + +Optional: + +- `code` (String) Cloud Router package code + + + + + +### Nested Schema for `trial` + +Optional: + +- `enabled` (Boolean) Marketplace Subscription Trial Enabled diff --git a/examples/data-sources/equinix_fabric_market_place_subscription/data-source.tf b/examples/data-sources/equinix_fabric_market_place_subscription/data-source.tf new file mode 100644 index 000000000..51f2638e3 --- /dev/null +++ b/examples/data-sources/equinix_fabric_market_place_subscription/data-source.tf @@ -0,0 +1,18 @@ +data "equinix_fabric_market_place_subscription" "subscription-test" { + uuid = "" +} +output "id" { + value = data.equinix_fabric_market_place_subscription.subscription-test.id +} +output "status" { + value = data.equinix_fabric_market_place_subscription.subscription-test.status +} +output "marketplace" { + value = data.equinix_fabric_market_place_subscription.subscription-test.marketplace +} +output "offer_type" { + value = data.equinix_fabric_market_place_subscription.subscription-test.offer_type +} +output "is_auto_renew" { + value = data.equinix_fabric_market_place_subscription.subscription-test.is_auto_renew +}