From 8df9fe0da8a7adf696f33269d05f65c6e8865a95 Mon Sep 17 00:00:00 2001 From: srushti-patl Date: Tue, 27 Aug 2024 10:47:14 -0700 Subject: [PATCH 1/6] feat: Adding Marketplace Subscription capability to Fabric Cloud Router Resource --- equinix/resource_fabric_cloud_router.go | 62 ++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/equinix/resource_fabric_cloud_router.go b/equinix/resource_fabric_cloud_router.go index 4c5dc0cd9..974357f7a 100644 --- a/equinix/resource_fabric_cloud_router.go +++ b/equinix/resource_fabric_cloud_router.go @@ -56,6 +56,23 @@ func fabricCloudRouterProjectSch() map[string]*schema.Schema { } } +func fabricMarketplaceSubscriptionSch() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + Computed: true, + Optional: true, + Description: "Marketplace Subscription type like; AWS_MARKETPLACE_SUBSCRIPTION", + }, + "uuid": { + Type: schema.TypeString, + Computed: true, + Optional: true, + Description: "Equinix-assigned Marketplace Subscription identifier", + }, + } +} + func fabricCloudRouterResourceSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "uuid": { @@ -132,9 +149,20 @@ func fabricCloudRouterResourceSchema() map[string]*schema.Schema { Schema: fabricCloudRouterProjectSch(), }, }, + "marketplace_subscription": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Description: "Equinix Fabric Entity for Marketplace Subscription", + MaxItems: 1, + Elem: &schema.Resource{ + Schema: fabricMarketplaceSubscriptionSch(), + }, + }, "account": { Type: schema.TypeSet, - Required: true, + Optional: true, + Computed: true, Description: "Customer account information that is associated with this Fabric Cloud Router", MaxItems: 1, Elem: &schema.Resource{ @@ -209,7 +237,7 @@ func resourceFabricCloudRouter() *schema.Resource { } func accountCloudRouterTerraformToGo(accountList []interface{}) fabricv4.SimplifiedAccount { - if accountList == nil { + if accountList == nil || len(accountList) == 0 { return fabricv4.SimplifiedAccount{} } simplifiedAccount := fabricv4.SimplifiedAccount{} @@ -243,6 +271,17 @@ func projectCloudRouterTerraformToGo(projectTerraform []interface{}) fabricv4.Pr return project } +func marketplaceSubscriptionCloudRouterTerraformToGo(marketplaceSubscriptionTerraform []interface{}) fabricv4.MarketplaceSubscription { + if marketplaceSubscriptionTerraform == nil || len(marketplaceSubscriptionTerraform) == 0 { + return fabricv4.MarketplaceSubscription{} + } + marketplaceSubscription := fabricv4.MarketplaceSubscription{} + marketplaceSubscriptionMap := marketplaceSubscriptionTerraform[0].(map[string]interface{}) + subscriptionUUID := marketplaceSubscriptionMap["uuid"].(string) + marketplaceSubscription.SetUuid(subscriptionUUID) + + return marketplaceSubscription +} func resourceFabricCloudRouterCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { client := meta.(*config.Config).NewFabricClientForSDK(d) @@ -273,6 +312,10 @@ func resourceFabricCloudRouterCreate(ctx context.Context, d *schema.ResourceData package_ := packageCloudRouterTerraformToGo(schemaPackage) createCloudRouterRequest.SetPackage(package_) + schemaMarketplaceSubscription := d.Get("marketplace_subscription").(*schema.Set).List() + marketplaceSubscription := marketplaceSubscriptionCloudRouterTerraformToGo(schemaMarketplaceSubscription) + createCloudRouterRequest.SetMarketplaceSubscription(marketplaceSubscription) + if orderTerraform, ok := d.GetOk("order"); ok { order := equinix_fabric_schema.OrderTerraformToGo(orderTerraform.(*schema.Set).List()) createCloudRouterRequest.SetOrder(order) @@ -315,6 +358,7 @@ func fabricCloudRouterMap(fcr *fabricv4.CloudRouter) map[string]interface{} { notifications := fcr.GetNotifications() project := fcr.GetProject() order := fcr.GetOrder() + marketplaceSubscription := fcr.GetMarketplaceSubscription() return map[string]interface{}{ "name": fcr.GetName(), "uuid": fcr.GetUuid(), @@ -334,6 +378,7 @@ func fabricCloudRouterMap(fcr *fabricv4.CloudRouter) map[string]interface{} { "distinct_ipv6_prefixes_count": fcr.GetDistinctIpv6PrefixesCount(), "connections_count": fcr.GetConnectionsCount(), "order": equinix_fabric_schema.OrderGoToTerraform(&order), + "marketplace_subscription": marketplaceSubscriptionCloudRouterGoToTerraform(&marketplaceSubscription), } } @@ -372,6 +417,19 @@ func packageCloudRouterGoToTerraform(packageType *fabricv4.CloudRouterPostReques ) return packageSet } +func marketplaceSubscriptionCloudRouterGoToTerraform(subscription *fabricv4.MarketplaceSubscription) *schema.Set { + if subscription == nil { + return nil + } + mappedSubscription := make(map[string]interface{}) + mappedSubscription["type"] = string(subscription.GetType()) + mappedSubscription["uuid"] = subscription.GetUuid() + + subscriptionSet := schema.NewSet( + schema.HashResource(&schema.Resource{Schema: fabricMarketplaceSubscriptionSch()}), + []interface{}{mappedSubscription}) + return subscriptionSet +} func getCloudRouterUpdateRequest(conn *fabricv4.CloudRouter, d *schema.ResourceData) (fabricv4.CloudRouterChangeOperation, error) { changeOps := fabricv4.CloudRouterChangeOperation{} existingName := conn.GetName() From 1647b2ad9ba43fdebc3d1f4ba4684934a2353867 Mon Sep 17 00:00:00 2001 From: srushti-patl Date: Tue, 27 Aug 2024 12:12:41 -0700 Subject: [PATCH 2/6] fix: Resolving lint errors --- equinix/resource_fabric_cloud_router.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/equinix/resource_fabric_cloud_router.go b/equinix/resource_fabric_cloud_router.go index 974357f7a..691daf751 100644 --- a/equinix/resource_fabric_cloud_router.go +++ b/equinix/resource_fabric_cloud_router.go @@ -237,7 +237,7 @@ func resourceFabricCloudRouter() *schema.Resource { } func accountCloudRouterTerraformToGo(accountList []interface{}) fabricv4.SimplifiedAccount { - if accountList == nil || len(accountList) == 0 { + if len(accountList) == 0 { return fabricv4.SimplifiedAccount{} } simplifiedAccount := fabricv4.SimplifiedAccount{} @@ -249,7 +249,7 @@ func accountCloudRouterTerraformToGo(accountList []interface{}) fabricv4.Simplif } func packageCloudRouterTerraformToGo(packageList []interface{}) fabricv4.CloudRouterPostRequestPackage { - if packageList == nil || len(packageList) == 0 { + if len(packageList) == 0 { return fabricv4.CloudRouterPostRequestPackage{} } @@ -261,7 +261,7 @@ func packageCloudRouterTerraformToGo(packageList []interface{}) fabricv4.CloudRo return package_ } func projectCloudRouterTerraformToGo(projectTerraform []interface{}) fabricv4.Project { - if projectTerraform == nil || len(projectTerraform) == 0 { + if len(projectTerraform) == 0 { return fabricv4.Project{} } project := fabricv4.Project{} @@ -272,7 +272,7 @@ func projectCloudRouterTerraformToGo(projectTerraform []interface{}) fabricv4.Pr return project } func marketplaceSubscriptionCloudRouterTerraformToGo(marketplaceSubscriptionTerraform []interface{}) fabricv4.MarketplaceSubscription { - if marketplaceSubscriptionTerraform == nil || len(marketplaceSubscriptionTerraform) == 0 { + if len(marketplaceSubscriptionTerraform) == 0 { return fabricv4.MarketplaceSubscription{} } marketplaceSubscription := fabricv4.MarketplaceSubscription{} From fcaef2344c784ac1dd31ee5d1f23c5a06ffc3d40 Mon Sep 17 00:00:00 2001 From: srushti-patl Date: Tue, 27 Aug 2024 14:23:23 -0700 Subject: [PATCH 3/6] fix: Resolving fmt lint error --- equinix/resource_fabric_cloud_router.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/equinix/resource_fabric_cloud_router.go b/equinix/resource_fabric_cloud_router.go index 691daf751..b0df495cc 100644 --- a/equinix/resource_fabric_cloud_router.go +++ b/equinix/resource_fabric_cloud_router.go @@ -3,13 +3,14 @@ package equinix import ( "context" "fmt" + "log" + "strings" + "time" + "github.com/equinix/equinix-sdk-go/services/fabricv4" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "log" - "strings" - "time" equinix_errors "github.com/equinix/terraform-provider-equinix/internal/errors" equinix_fabric_schema "github.com/equinix/terraform-provider-equinix/internal/fabric/schema" From b21dd1f84c5cfbfc37ab29f90b1a9453f2f8842a Mon Sep 17 00:00:00 2001 From: srushti-patl Date: Mon, 9 Sep 2024 12:13:54 -0700 Subject: [PATCH 4/6] fix: Updating FCR resource as per comments --- equinix/resource_fabric_cloud_router.go | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/equinix/resource_fabric_cloud_router.go b/equinix/resource_fabric_cloud_router.go index b0df495cc..47f1f6c68 100644 --- a/equinix/resource_fabric_cloud_router.go +++ b/equinix/resource_fabric_cloud_router.go @@ -34,8 +34,7 @@ func fabricCloudRouterAccountSch() map[string]*schema.Schema { return map[string]*schema.Schema{ "account_number": { Type: schema.TypeInt, - Computed: true, - Optional: true, + Required: true, Description: "Account Number", }, } @@ -67,8 +66,7 @@ func fabricMarketplaceSubscriptionSch() map[string]*schema.Schema { }, "uuid": { Type: schema.TypeString, - Computed: true, - Optional: true, + Required: true, Description: "Equinix-assigned Marketplace Subscription identifier", }, } @@ -279,7 +277,13 @@ func marketplaceSubscriptionCloudRouterTerraformToGo(marketplaceSubscriptionTerr marketplaceSubscription := fabricv4.MarketplaceSubscription{} marketplaceSubscriptionMap := marketplaceSubscriptionTerraform[0].(map[string]interface{}) subscriptionUUID := marketplaceSubscriptionMap["uuid"].(string) - marketplaceSubscription.SetUuid(subscriptionUUID) + subscriptionType := marketplaceSubscriptionMap["type"].(string) + if subscriptionUUID != "" { + marketplaceSubscription.SetUuid(subscriptionUUID) + } + if subscriptionType != "" { + marketplaceSubscription.SetType(fabricv4.MarketplaceSubscriptionType(subscriptionType)) + } return marketplaceSubscription } @@ -313,15 +317,16 @@ func resourceFabricCloudRouterCreate(ctx context.Context, d *schema.ResourceData package_ := packageCloudRouterTerraformToGo(schemaPackage) createCloudRouterRequest.SetPackage(package_) - schemaMarketplaceSubscription := d.Get("marketplace_subscription").(*schema.Set).List() - marketplaceSubscription := marketplaceSubscriptionCloudRouterTerraformToGo(schemaMarketplaceSubscription) - createCloudRouterRequest.SetMarketplaceSubscription(marketplaceSubscription) - if orderTerraform, ok := d.GetOk("order"); ok { order := equinix_fabric_schema.OrderTerraformToGo(orderTerraform.(*schema.Set).List()) createCloudRouterRequest.SetOrder(order) } + if marketplaceSubscriptionTerraform, ok := d.GetOk("marketplace_subscription"); ok { + marketplaceSubscription := marketplaceSubscriptionCloudRouterTerraformToGo(marketplaceSubscriptionTerraform.(*schema.Set).List()) + createCloudRouterRequest.SetMarketplaceSubscription(marketplaceSubscription) + } + start := time.Now() fcr, _, err := client.CloudRoutersApi.CreateCloudRouter(ctx).CloudRouterPostRequest(createCloudRouterRequest).Execute() if err != nil { From ec886cd9cb979ee088a6c8607d2cbd4fc053436b Mon Sep 17 00:00:00 2001 From: srushti-patl Date: Mon, 9 Sep 2024 23:21:33 -0700 Subject: [PATCH 5/6] fix: Updating docs for cloud router resource and resource based on marketplace subscription --- docs/data-sources/fabric_cloud_router.md | 10 +++ docs/data-sources/fabric_cloud_routers.md | 10 +++ docs/resources/fabric_cloud_router.md | 66 ++++++++++++++++--- .../equinix_fabric_cloud_router/example_1.tf | 24 +++++++ .../{resource.tf => example_2.tf} | 0 .../resources/fabric_cloud_router.md.tmpl | 29 ++++++++ 6 files changed, 129 insertions(+), 10 deletions(-) create mode 100644 examples/resources/equinix_fabric_cloud_router/example_1.tf rename examples/resources/equinix_fabric_cloud_router/{resource.tf => example_2.tf} (100%) create mode 100644 templates/resources/fabric_cloud_router.md.tmpl diff --git a/docs/data-sources/fabric_cloud_router.md b/docs/data-sources/fabric_cloud_router.md index 4fe254dbe..d5e2eca6d 100644 --- a/docs/data-sources/fabric_cloud_router.md +++ b/docs/data-sources/fabric_cloud_router.md @@ -79,6 +79,7 @@ output "type" { - `href` (String) Fabric Cloud Router URI information - `id` (String) The ID of this resource. - `location` (Set of Object) Fabric Cloud Router location (see [below for nested schema](#nestedatt--location)) +- `marketplace_subscription` (Set of Object) Equinix Fabric Entity for Marketplace Subscription (see [below for nested schema](#nestedatt--marketplace_subscription)) - `name` (String) Fabric Cloud Router name. An alpha-numeric 24 characters string which can include only hyphens and underscores - `notifications` (List of Object) Preferences for notifications on Fabric Cloud Router configuration or status changes (see [below for nested schema](#nestedatt--notifications)) - `order` (Set of Object) Order information related to this Fabric Cloud Router (see [below for nested schema](#nestedatt--order)) @@ -125,6 +126,15 @@ Read-Only: - `region` (String) + +### Nested Schema for `marketplace_subscription` + +Read-Only: + +- `type` (String) +- `uuid` (String) + + ### Nested Schema for `notifications` diff --git a/docs/data-sources/fabric_cloud_routers.md b/docs/data-sources/fabric_cloud_routers.md index 199ef3c59..66f227d30 100644 --- a/docs/data-sources/fabric_cloud_routers.md +++ b/docs/data-sources/fabric_cloud_routers.md @@ -160,6 +160,7 @@ Read-Only: - `equinix_asn` (Number) - `href` (String) - `location` (Set of Object) (see [below for nested schema](#nestedobjatt--data--location)) +- `marketplace_subscription` (Set of Object) (see [below for nested schema](#nestedobjatt--data--marketplace_subscription)) - `name` (String) - `notifications` (List of Object) (see [below for nested schema](#nestedobjatt--data--notifications)) - `order` (Set of Object) (see [below for nested schema](#nestedobjatt--data--order)) @@ -207,6 +208,15 @@ Read-Only: - `region` (String) + +### Nested Schema for `data.marketplace_subscription` + +Read-Only: + +- `type` (String) +- `uuid` (String) + + ### Nested Schema for `data.notifications` diff --git a/docs/resources/fabric_cloud_router.md b/docs/resources/fabric_cloud_router.md index 41d696c7a..644811fe5 100644 --- a/docs/resources/fabric_cloud_router.md +++ b/docs/resources/fabric_cloud_router.md @@ -1,5 +1,9 @@ --- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "equinix_fabric_cloud_router Resource - terraform-provider-equinix" subcategory: "Fabric" +description: |- + Fabric V4 API compatible resource allows creation and management of Equinix Fabric Cloud Router --- # equinix_fabric_cloud_router (Resource) @@ -12,6 +16,7 @@ Additional documentation: ## Example Usage +Fabric Cloud Router ```terraform resource "equinix_fabric_cloud_router" "new_cloud_router"{ name = "Router-SV" @@ -38,12 +43,39 @@ resource "equinix_fabric_cloud_router" "new_cloud_router"{ } ``` +Fabric Cloud Router with Marketplace Subscription id +```terraform +resource "equinix_fabric_cloud_router" "new_cloud_router"{ + name = "Router-SV" + type = "XF_ROUTER" + notifications{ + type = "ALL" + emails = ["example@equinix.com","test1@equinix.com"] + } + order { + purchase_order_number = "1-323292" + } + location { + metro_code = "SV" + } + package { + code = "STANDARD" + } + project { + project_id = "776847000642406" + } + marketplace_subscription { + type = "AWS_MARKETPLACE_SUBSCRIPTION" + uuid = "2823b8ae07-a2a2-45b4-a658-c3542bb24e9" + } +} +``` + ## Schema ### Required -- `account` (Block Set, Min: 1, Max: 1) Customer account information that is associated with this Fabric Cloud Router (see [below for nested schema](#nestedblock--account)) - `location` (Block Set, Min: 1, Max: 1) Fabric Cloud Router location (see [below for nested schema](#nestedblock--location)) - `name` (String) Fabric Cloud Router name. An alpha-numeric 24 characters string which can include only hyphens and underscores - `notifications` (Block List, Min: 1) Preferences for notifications on Fabric Cloud Router configuration or status changes (see [below for nested schema](#nestedblock--notifications)) @@ -53,8 +85,10 @@ resource "equinix_fabric_cloud_router" "new_cloud_router"{ ### Optional +- `account` (Block Set, Max: 1) Customer account information that is associated with this Fabric Cloud Router (see [below for nested schema](#nestedblock--account)) - `description` (String) Customer-provided Fabric Cloud Router description - `href` (String) Fabric Cloud Router URI information +- `marketplace_subscription` (Block Set, Max: 1) Equinix Fabric Entity for Marketplace Subscription (see [below for nested schema](#nestedblock--marketplace_subscription)) - `order` (Block Set, Max: 1) Order information related to this Fabric Cloud Router (see [below for nested schema](#nestedblock--order)) - `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) - `uuid` (String) Equinix-assigned Fabric Cloud Router identifier @@ -71,14 +105,6 @@ resource "equinix_fabric_cloud_router" "new_cloud_router"{ - `id` (String) The ID of this resource. - `state` (String) Fabric Cloud Router overall state - -### Nested Schema for `account` - -Optional: - -- `account_number` (Number) Account Number - - ### Nested Schema for `location` @@ -120,6 +146,26 @@ Optional: - `project_id` (String) Project Id + +### Nested Schema for `account` + +Required: + +- `account_number` (Number) Account Number + + + +### Nested Schema for `marketplace_subscription` + +Required: + +- `uuid` (String) Equinix-assigned Marketplace Subscription identifier + +Optional: + +- `type` (String) Marketplace Subscription type like; AWS_MARKETPLACE_SUBSCRIPTION + + ### Nested Schema for `order` @@ -158,4 +204,4 @@ Read-Only: - `updated_by` (String) - `updated_by_email` (String) - `updated_by_full_name` (String) -- `updated_date_time` (String) +- `updated_date_time` (String) \ No newline at end of file diff --git a/examples/resources/equinix_fabric_cloud_router/example_1.tf b/examples/resources/equinix_fabric_cloud_router/example_1.tf new file mode 100644 index 000000000..552a095ac --- /dev/null +++ b/examples/resources/equinix_fabric_cloud_router/example_1.tf @@ -0,0 +1,24 @@ +resource "equinix_fabric_cloud_router" "new_cloud_router"{ + name = "Router-SV" + type = "XF_ROUTER" + notifications{ + type = "ALL" + emails = ["example@equinix.com","test1@equinix.com"] + } + order { + purchase_order_number = "1-323292" + } + location { + metro_code = "SV" + } + package { + code = "STANDARD" + } + project { + project_id = "776847000642406" + } + marketplace_subscription { + type = "AWS_MARKETPLACE_SUBSCRIPTION" + uuid = "2823b8ae07-a2a2-45b4-a658-c3542bb24e9" + } +} diff --git a/examples/resources/equinix_fabric_cloud_router/resource.tf b/examples/resources/equinix_fabric_cloud_router/example_2.tf similarity index 100% rename from examples/resources/equinix_fabric_cloud_router/resource.tf rename to examples/resources/equinix_fabric_cloud_router/example_2.tf diff --git a/templates/resources/fabric_cloud_router.md.tmpl b/templates/resources/fabric_cloud_router.md.tmpl new file mode 100644 index 000000000..d2da808d9 --- /dev/null +++ b/templates/resources/fabric_cloud_router.md.tmpl @@ -0,0 +1,29 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "equinix_fabric_cloud_router Resource - terraform-provider-equinix" +subcategory: "Fabric" +description: |- + Fabric V4 API compatible resource allows creation and management of Equinix Fabric Cloud Router +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_fabric_cloud_router (Resource) + +Fabric V4 API compatible resource allows creation and management of [Equinix Fabric Cloud Router](https://docs.equinix.com/en-us/Content/Interconnection/FCR/FCR-intro.htm#HowItWorks). + +Additional documentation: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/FCR/FCR-intro.htm#HowItWorks +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#fabric-cloud-routers + +## Example Usage + +Fabric Cloud Router +{{tffile "examples/resources/equinix_fabric_cloud_router/example_1.tf"}} + +Fabric Cloud Router with Marketplace Subscription id +{{tffile "examples/resources/equinix_fabric_cloud_router/example_2.tf"}} + +{{ .SchemaMarkdown | trimspace }} From 9dc48cd6c828758247de345eea80f0d055f52e83 Mon Sep 17 00:00:00 2001 From: srushti-patl Date: Tue, 10 Sep 2024 13:07:19 -0700 Subject: [PATCH 6/6] feat: Updating docs --- docs/resources/fabric_cloud_router.md | 6 +----- examples/resources/equinix_fabric_cloud_router/example_1.tf | 5 ++--- examples/resources/equinix_fabric_cloud_router/example_2.tf | 5 +++-- templates/resources/fabric_cloud_router.md.tmpl | 4 ---- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/docs/resources/fabric_cloud_router.md b/docs/resources/fabric_cloud_router.md index 644811fe5..7d5979969 100644 --- a/docs/resources/fabric_cloud_router.md +++ b/docs/resources/fabric_cloud_router.md @@ -1,9 +1,5 @@ --- -# generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "equinix_fabric_cloud_router Resource - terraform-provider-equinix" subcategory: "Fabric" -description: |- - Fabric V4 API compatible resource allows creation and management of Equinix Fabric Cloud Router --- # equinix_fabric_cloud_router (Resource) @@ -204,4 +200,4 @@ Read-Only: - `updated_by` (String) - `updated_by_email` (String) - `updated_by_full_name` (String) -- `updated_date_time` (String) \ No newline at end of file +- `updated_date_time` (String) diff --git a/examples/resources/equinix_fabric_cloud_router/example_1.tf b/examples/resources/equinix_fabric_cloud_router/example_1.tf index 552a095ac..d1dce4b66 100644 --- a/examples/resources/equinix_fabric_cloud_router/example_1.tf +++ b/examples/resources/equinix_fabric_cloud_router/example_1.tf @@ -17,8 +17,7 @@ resource "equinix_fabric_cloud_router" "new_cloud_router"{ project { project_id = "776847000642406" } - marketplace_subscription { - type = "AWS_MARKETPLACE_SUBSCRIPTION" - uuid = "2823b8ae07-a2a2-45b4-a658-c3542bb24e9" + account { + account_number = "203612" } } diff --git a/examples/resources/equinix_fabric_cloud_router/example_2.tf b/examples/resources/equinix_fabric_cloud_router/example_2.tf index d1dce4b66..552a095ac 100644 --- a/examples/resources/equinix_fabric_cloud_router/example_2.tf +++ b/examples/resources/equinix_fabric_cloud_router/example_2.tf @@ -17,7 +17,8 @@ resource "equinix_fabric_cloud_router" "new_cloud_router"{ project { project_id = "776847000642406" } - account { - account_number = "203612" + marketplace_subscription { + type = "AWS_MARKETPLACE_SUBSCRIPTION" + uuid = "2823b8ae07-a2a2-45b4-a658-c3542bb24e9" } } diff --git a/templates/resources/fabric_cloud_router.md.tmpl b/templates/resources/fabric_cloud_router.md.tmpl index d2da808d9..f1a4ca8bd 100644 --- a/templates/resources/fabric_cloud_router.md.tmpl +++ b/templates/resources/fabric_cloud_router.md.tmpl @@ -1,9 +1,5 @@ --- -# generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "equinix_fabric_cloud_router Resource - terraform-provider-equinix" subcategory: "Fabric" -description: |- - Fabric V4 API compatible resource allows creation and management of Equinix Fabric Cloud Router --- {{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates.