From 34d97fcd95e7a5f7dc112372b6414d3032ff2cc6 Mon Sep 17 00:00:00 2001 From: Thomas Krahn Date: Thu, 16 Apr 2020 08:54:35 +0200 Subject: [PATCH] Fix #10 by sorting strings slices --- nexus/tools.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nexus/tools.go b/nexus/tools.go index 6aae1b3e..16608473 100644 --- a/nexus/tools.go +++ b/nexus/tools.go @@ -3,6 +3,7 @@ package nexus import ( "fmt" "os" + "sort" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) @@ -13,6 +14,7 @@ func resourceDataStringSlice(d *schema.ResourceData, attribute string) []string for i := 0; i < n; i++ { data[i] = d.Get(fmt.Sprintf("%s.%d", attribute, i)).(string) } + sort.Strings(data) return data }