From 670fa6bb2a671f9296288b9c23d3c5df27226169 Mon Sep 17 00:00:00 2001 From: Chris Marget Date: Wed, 18 Dec 2024 17:28:34 -0500 Subject: [PATCH] remove UUID code; update docs --- apstra/provider.go | 3 --- apstra/utils/uuid.go | 17 ----------------- ...atacenter_connectivity_template_interface.md | 8 -------- ...datacenter_connectivity_template_loopback.md | 1 - .../datacenter_connectivity_template_svi.md | 2 -- .../datacenter_connectivity_template_system.md | 1 - 6 files changed, 32 deletions(-) delete mode 100644 apstra/utils/uuid.go diff --git a/apstra/provider.go b/apstra/provider.go index f50e08e9..5fbe372e 100644 --- a/apstra/provider.go +++ b/apstra/provider.go @@ -16,7 +16,6 @@ import ( "github.com/Juniper/terraform-provider-apstra/apstra/compatibility" "github.com/Juniper/terraform-provider-apstra/apstra/constants" "github.com/Juniper/terraform-provider-apstra/apstra/utils" - "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-framework-validators/int64validator" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/datasource" @@ -266,8 +265,6 @@ func (o providerConfig) handleMutexFlag(_ context.Context, diags *diag.Diagnosti } func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse) { - uuid.SetNodeID([]byte("apstra")) - terraformVersionWarnings(ctx, req.TerraformVersion, &resp.Diagnostics) // Retrieve provider data from configuration diff --git a/apstra/utils/uuid.go b/apstra/utils/uuid.go deleted file mode 100644 index 3876f33e..00000000 --- a/apstra/utils/uuid.go +++ /dev/null @@ -1,17 +0,0 @@ -package utils - -import ( - "github.com/google/uuid" - "github.com/hashicorp/terraform-plugin-framework/diag" - "github.com/hashicorp/terraform-plugin-framework/types" -) - -func NewUuidStringVal(diags *diag.Diagnostics) types.String { - id, err := uuid.NewUUID() - if err != nil { - diags.AddError("failed to generate UUID", err.Error()) - return types.StringNull() - } - - return types.StringValue(id.String()) -} diff --git a/docs/resources/datacenter_connectivity_template_interface.md b/docs/resources/datacenter_connectivity_template_interface.md index e6300cbc..73645179 100644 --- a/docs/resources/datacenter_connectivity_template_interface.md +++ b/docs/resources/datacenter_connectivity_template_interface.md @@ -190,7 +190,6 @@ Required: Read-Only: -- `batch_id` (String) Unique identifier for this CT Primitive Element's downstream collection - `id` (String) Unique identifier for this CT Primitive element - `pipeline_id` (String) Unique identifier for this CT Primitive Element's upstream pipeline @@ -230,7 +229,6 @@ Required: Read-Only: -- `batch_id` (String) Unique identifier for this CT Primitive Element's downstream collection - `id` (String) Unique identifier for this CT Primitive element - `pipeline_id` (String) Unique identifier for this CT Primitive Element's upstream pipeline @@ -271,7 +269,6 @@ Required: Read-Only: -- `batch_id` (String) Unique identifier for this CT Primitive Element's downstream collection - `id` (String) Unique identifier for this CT Primitive element - `pipeline_id` (String) Unique identifier for this CT Primitive Element's upstream pipeline @@ -287,7 +284,6 @@ Required: Read-Only: -- `batch_id` (String) Unique identifier for this CT Primitive Element's downstream collection - `id` (String) Unique identifier for this CT Primitive element - `pipeline_id` (String) Unique identifier for this CT Primitive Element's upstream pipeline @@ -302,7 +298,6 @@ Required: Read-Only: -- `batch_id` (String) Unique identifier for this CT Primitive Element's downstream collection - `id` (String) Unique identifier for this CT Primitive element - `pipeline_id` (String) Unique identifier for this CT Primitive Element's upstream pipeline @@ -317,7 +312,6 @@ Optional: Read-Only: -- `batch_id` (String) Unique identifier for this CT Primitive Element's downstream collection - `id` (String) Unique identifier for this CT Primitive element - `pipeline_id` (String) Unique identifier for this CT Primitive Element's upstream pipeline @@ -385,7 +379,6 @@ Required: Read-Only: -- `batch_id` (String) Unique identifier for this CT Primitive Element's downstream collection - `id` (String) Unique identifier for this CT Primitive element - `pipeline_id` (String) Unique identifier for this CT Primitive Element's upstream pipeline @@ -401,7 +394,6 @@ Required: Read-Only: -- `batch_id` (String) Unique identifier for this CT Primitive Element's downstream collection - `id` (String) Unique identifier for this CT Primitive element - `pipeline_id` (String) Unique identifier for this CT Primitive Element's upstream pipeline diff --git a/docs/resources/datacenter_connectivity_template_loopback.md b/docs/resources/datacenter_connectivity_template_loopback.md index 6e061f71..01327b05 100644 --- a/docs/resources/datacenter_connectivity_template_loopback.md +++ b/docs/resources/datacenter_connectivity_template_loopback.md @@ -136,7 +136,6 @@ Required: Read-Only: -- `batch_id` (String) Unique identifier for this CT Primitive Element's downstream collection - `id` (String) Unique identifier for this CT Primitive element - `pipeline_id` (String) Unique identifier for this CT Primitive Element's upstream pipeline diff --git a/docs/resources/datacenter_connectivity_template_svi.md b/docs/resources/datacenter_connectivity_template_svi.md index 2379d088..8fb18196 100644 --- a/docs/resources/datacenter_connectivity_template_svi.md +++ b/docs/resources/datacenter_connectivity_template_svi.md @@ -141,7 +141,6 @@ Required: Read-Only: -- `batch_id` (String) Unique identifier for this CT Primitive Element's downstream collection - `id` (String) Unique identifier for this CT Primitive element - `pipeline_id` (String) Unique identifier for this CT Primitive Element's upstream pipeline @@ -182,7 +181,6 @@ Required: Read-Only: -- `batch_id` (String) Unique identifier for this CT Primitive Element's downstream collection - `id` (String) Unique identifier for this CT Primitive element - `pipeline_id` (String) Unique identifier for this CT Primitive Element's upstream pipeline diff --git a/docs/resources/datacenter_connectivity_template_system.md b/docs/resources/datacenter_connectivity_template_system.md index 38a0ceaa..ccad643f 100644 --- a/docs/resources/datacenter_connectivity_template_system.md +++ b/docs/resources/datacenter_connectivity_template_system.md @@ -78,7 +78,6 @@ Required: Read-Only: -- `batch_id` (String) Unique identifier for this CT Primitive Element's downstream collection - `id` (String) Unique identifier for this CT Primitive element - `pipeline_id` (String) Unique identifier for this CT Primitive Element's upstream pipeline