From c7ff5b4a917498309e750e4fcff0b909c19106a1 Mon Sep 17 00:00:00 2001 From: Zheng Qin Date: Tue, 10 Sep 2024 15:05:10 -0400 Subject: [PATCH] Sort provider version by provider Source. --- cli/bpmetadata/tfconfig.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cli/bpmetadata/tfconfig.go b/cli/bpmetadata/tfconfig.go index 89ba1d1ab574..d173f104aeb6 100644 --- a/cli/bpmetadata/tfconfig.go +++ b/cli/bpmetadata/tfconfig.go @@ -216,6 +216,8 @@ func parseBlueprintProviderVersions(versionsFile *hcl.File) ([]*ProviderVersion, Version: strings.Join(providerData.VersionConstraints, ", "), }) } + // Sort provider_versions + sort.SliceStable(v, func(i, j int) bool { return v[i].Source < v[j].Source }) return v, nil }