From 50f6aa79b1a260b9bcda18f2c42b87f05a6d449f Mon Sep 17 00:00:00 2001 From: Julien Duchesne Date: Wed, 31 Jul 2024 13:35:25 -0400 Subject: [PATCH] Update clients to latest version (#1735) The Grafana Cloud and SLO clients are now generated the same way, so that path changed a bit --- go.mod | 5 +++-- go.sum | 10 ++++++---- internal/common/client.go | 2 +- internal/resources/cloud/common.go | 2 +- internal/resources/cloud/common_lister.go | 2 +- .../resources/cloud/data_source_cloud_organization.go | 2 +- internal/resources/cloud/data_source_cloud_stack.go | 2 +- .../resources/cloud/data_source_cloud_stack_test.go | 2 +- .../resources/cloud/resource_cloud_access_policy.go | 2 +- .../cloud/resource_cloud_access_policy_token.go | 2 +- .../cloud/resource_cloud_access_policy_token_test.go | 2 +- internal/resources/cloud/resource_cloud_org_member.go | 2 +- internal/resources/cloud/resource_cloud_plugin.go | 2 +- internal/resources/cloud/resource_cloud_plugin_test.go | 2 +- internal/resources/cloud/resource_cloud_stack.go | 2 +- .../cloud/resource_cloud_stack_service_account.go | 2 +- .../cloud/resource_cloud_stack_service_account_test.go | 2 +- .../resource_cloud_stack_service_account_token.go | 2 +- internal/resources/cloud/resource_cloud_stack_test.go | 2 +- .../resource_synthetic_monitoring_installation.go | 2 +- .../resource_synthetic_monitoring_installation_test.go | 2 +- pkg/generate/cloud.go | 2 +- pkg/provider/configure_clients.go | 2 +- 23 files changed, 30 insertions(+), 27 deletions(-) diff --git a/go.mod b/go.mod index 567bf1510..2a7ccf461 100644 --- a/go.mod +++ b/go.mod @@ -10,10 +10,10 @@ require ( github.com/go-openapi/runtime v0.28.0 github.com/go-openapi/strfmt v0.23.0 github.com/grafana/amixr-api-go-client v0.0.12 // main branch - github.com/grafana/grafana-com-public-clients/go/gcom v0.0.0-20240729133745-7aca6e469e1f + github.com/grafana/grafana-com-public-clients/go v0.0.0-20240731155007-d5af528b15e9 github.com/grafana/grafana-openapi-client-go v0.0.0-20240723170622-ae2c94b7c9a3 github.com/grafana/machine-learning-go-client v0.8.0 - github.com/grafana/slo-openapi-client/go v0.0.0-20240717162314-26344962b4c5 + github.com/grafana/slo-openapi-client/go v0.0.0-20240731123249-1327bbecc168 github.com/grafana/synthetic-monitoring-agent v0.25.0 github.com/grafana/synthetic-monitoring-api-go-client v0.8.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 @@ -173,6 +173,7 @@ require ( google.golang.org/grpc v1.65.0 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect + gopkg.in/validator.v2 v2.0.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index fb9be5eb0..464105621 100644 --- a/go.sum +++ b/go.sum @@ -136,8 +136,8 @@ github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/grafana/amixr-api-go-client v0.0.12 h1:oEHZTBhxoZ35EsfeccZBJGPKhZUVOmdSir3WWnSJMLc= github.com/grafana/amixr-api-go-client v0.0.12/go.mod h1:N6x26XUrM5zGtK5zL5vNJnAn2JFMxLFPPLTw/6pDkFE= -github.com/grafana/grafana-com-public-clients/go/gcom v0.0.0-20240729133745-7aca6e469e1f h1:tB7ToZJeuS+IuGfoI5uPE1DA2yGyn7epGmTn9/tbd7g= -github.com/grafana/grafana-com-public-clients/go/gcom v0.0.0-20240729133745-7aca6e469e1f/go.mod h1:6sYY1qgwYfSDNQhKQA0tar8Oc38cIGfyqwejhxoOsPs= +github.com/grafana/grafana-com-public-clients/go v0.0.0-20240731155007-d5af528b15e9 h1:0TeqFmeGW3bJ91tCNeZlF8MWRPEDUW7VuJDv9tsZJpI= +github.com/grafana/grafana-com-public-clients/go v0.0.0-20240731155007-d5af528b15e9/go.mod h1:wsjR7jy6h2Did3itoHqolcbfKgSBT1Pb/6WqhCTAD8Y= github.com/grafana/grafana-openapi-client-go v0.0.0-20240723170622-ae2c94b7c9a3 h1:W35ScJIkeyLuDlOo3F+u1JSRRvmoIYYf/ghA/17Y18Q= github.com/grafana/grafana-openapi-client-go v0.0.0-20240723170622-ae2c94b7c9a3/go.mod h1:hiZnMmXc9KXNUlvkV2BKFsiWuIFF/fF4wGgYWEjBitI= github.com/grafana/grafana-plugin-sdk-go v0.235.0 h1:UnZ/iBDvCkfDgwR94opi8trAWJXv4V8Qr1ocJKRRmqA= @@ -148,8 +148,8 @@ github.com/grafana/otel-profiling-go v0.5.1 h1:stVPKAFZSa7eGiqbYuG25VcqYksR6iWvF github.com/grafana/otel-profiling-go v0.5.1/go.mod h1:ftN/t5A/4gQI19/8MoWurBEtC6gFw8Dns1sJZ9W4Tls= github.com/grafana/pyroscope-go/godeltaprof v0.1.7 h1:C11j63y7gymiW8VugJ9ZW0pWfxTZugdSJyC48olk5KY= github.com/grafana/pyroscope-go/godeltaprof v0.1.7/go.mod h1:Tk376Nbldo4Cha9RgiU7ik8WKFkNpfds98aUzS8omLE= -github.com/grafana/slo-openapi-client/go v0.0.0-20240717162314-26344962b4c5 h1:qUb8ZPVC/QQDh8uCH9ZObZnsdT9S7iX3qe3q73XLj/o= -github.com/grafana/slo-openapi-client/go v0.0.0-20240717162314-26344962b4c5/go.mod h1:HgbbeH2gFfCk2XZCrCly39DB13WkwWyQ+Ww+HTxePCs= +github.com/grafana/slo-openapi-client/go v0.0.0-20240731123249-1327bbecc168 h1:CK6VujoxBd4f2Fj04RveRDkGGt5nERYgrAJEaUnhol0= +github.com/grafana/slo-openapi-client/go v0.0.0-20240731123249-1327bbecc168/go.mod h1:HgbbeH2gFfCk2XZCrCly39DB13WkwWyQ+Ww+HTxePCs= github.com/grafana/synthetic-monitoring-agent v0.25.0 h1:krGprYHKs6Yc6ObGzt2b8u9wAKBGJs+MKys/pulpk1I= github.com/grafana/synthetic-monitoring-agent v0.25.0/go.mod h1:jqe7JItP1mNo1n/O3ufbmdRpk4T8nj8d/aH+T8ywUzc= github.com/grafana/synthetic-monitoring-api-go-client v0.8.0 h1:Tm4MtwwYmPNInGfnj66l6j6KOshMkNV4emIVKJdlXMg= @@ -525,6 +525,8 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/fsnotify/fsnotify.v1 v1.4.7 h1:XNNYLJHt73EyYiCZi6+xjupS9CpvmiDgjPTAjrBlQbo= gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE= +gopkg.in/validator.v2 v2.0.1 h1:xF0KWyGWXm/LM2G1TrEjqOu4pa6coO9AlWSf3msVfDY= +gopkg.in/validator.v2 v2.0.1/go.mod h1:lIUZBlB3Im4s/eYp39Ry/wkR02yOPhZ9IwIRBjuPuG8= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/internal/common/client.go b/internal/common/client.go index 19c88e5a4..858418431 100644 --- a/internal/common/client.go +++ b/internal/common/client.go @@ -7,7 +7,7 @@ import ( "sync" onCallAPI "github.com/grafana/amixr-api-go-client" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" goapi "github.com/grafana/grafana-openapi-client-go/client" "github.com/grafana/machine-learning-go-client/mlapi" slo "github.com/grafana/slo-openapi-client/go" diff --git a/internal/resources/cloud/common.go b/internal/resources/cloud/common.go index 34160e71c..afcf8251c 100644 --- a/internal/resources/cloud/common.go +++ b/internal/resources/cloud/common.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" "github.com/grafana/terraform-provider-grafana/v3/internal/common" "github.com/hashicorp/go-uuid" "github.com/hashicorp/terraform-plugin-framework/resource" diff --git a/internal/resources/cloud/common_lister.go b/internal/resources/cloud/common_lister.go index 4bb6c66aa..139506c43 100644 --- a/internal/resources/cloud/common_lister.go +++ b/internal/resources/cloud/common_lister.go @@ -5,7 +5,7 @@ import ( "fmt" "sync" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" "github.com/grafana/terraform-provider-grafana/v3/internal/common" ) diff --git a/internal/resources/cloud/data_source_cloud_organization.go b/internal/resources/cloud/data_source_cloud_organization.go index c24341f6e..fd8b8563d 100644 --- a/internal/resources/cloud/data_source_cloud_organization.go +++ b/internal/resources/cloud/data_source_cloud_organization.go @@ -4,7 +4,7 @@ import ( "context" "strconv" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" "github.com/grafana/terraform-provider-grafana/v3/internal/common" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/internal/resources/cloud/data_source_cloud_stack.go b/internal/resources/cloud/data_source_cloud_stack.go index 7cd395254..26af83bab 100644 --- a/internal/resources/cloud/data_source_cloud_stack.go +++ b/internal/resources/cloud/data_source_cloud_stack.go @@ -3,7 +3,7 @@ package cloud import ( "context" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" "github.com/grafana/terraform-provider-grafana/v3/internal/common" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/internal/resources/cloud/data_source_cloud_stack_test.go b/internal/resources/cloud/data_source_cloud_stack_test.go index f99901599..2c5c0c26b 100644 --- a/internal/resources/cloud/data_source_cloud_stack_test.go +++ b/internal/resources/cloud/data_source_cloud_stack_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" "github.com/grafana/terraform-provider-grafana/v3/internal/testutils" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) diff --git a/internal/resources/cloud/resource_cloud_access_policy.go b/internal/resources/cloud/resource_cloud_access_policy.go index 84b236b0e..00101f7e2 100644 --- a/internal/resources/cloud/resource_cloud_access_policy.go +++ b/internal/resources/cloud/resource_cloud_access_policy.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" "github.com/grafana/terraform-provider-grafana/v3/internal/common" "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/internal/resources/cloud/resource_cloud_access_policy_token.go b/internal/resources/cloud/resource_cloud_access_policy_token.go index 0ecdc5d56..78abdf31c 100644 --- a/internal/resources/cloud/resource_cloud_access_policy_token.go +++ b/internal/resources/cloud/resource_cloud_access_policy_token.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" "github.com/grafana/terraform-provider-grafana/v3/internal/common" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/internal/resources/cloud/resource_cloud_access_policy_token_test.go b/internal/resources/cloud/resource_cloud_access_policy_token_test.go index 4c963fe1b..fd5294e0c 100644 --- a/internal/resources/cloud/resource_cloud_access_policy_token_test.go +++ b/internal/resources/cloud/resource_cloud_access_policy_token_test.go @@ -10,7 +10,7 @@ import ( "testing" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" "github.com/grafana/terraform-provider-grafana/v3/internal/common" "github.com/grafana/terraform-provider-grafana/v3/internal/resources/cloud" "github.com/grafana/terraform-provider-grafana/v3/internal/testutils" diff --git a/internal/resources/cloud/resource_cloud_org_member.go b/internal/resources/cloud/resource_cloud_org_member.go index d3f72ef2d..6b220938a 100644 --- a/internal/resources/cloud/resource_cloud_org_member.go +++ b/internal/resources/cloud/resource_cloud_org_member.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" "github.com/grafana/terraform-provider-grafana/v3/internal/common" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/diag" diff --git a/internal/resources/cloud/resource_cloud_plugin.go b/internal/resources/cloud/resource_cloud_plugin.go index eccff17c6..4158fb8c5 100644 --- a/internal/resources/cloud/resource_cloud_plugin.go +++ b/internal/resources/cloud/resource_cloud_plugin.go @@ -3,7 +3,7 @@ package cloud import ( "context" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" "github.com/grafana/terraform-provider-grafana/v3/internal/common" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/internal/resources/cloud/resource_cloud_plugin_test.go b/internal/resources/cloud/resource_cloud_plugin_test.go index 3e2834fa3..88495aeec 100644 --- a/internal/resources/cloud/resource_cloud_plugin_test.go +++ b/internal/resources/cloud/resource_cloud_plugin_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" "github.com/grafana/terraform-provider-grafana/v3/internal/common" "github.com/grafana/terraform-provider-grafana/v3/internal/testutils" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" diff --git a/internal/resources/cloud/resource_cloud_stack.go b/internal/resources/cloud/resource_cloud_stack.go index 6ee216591..7e33ea401 100644 --- a/internal/resources/cloud/resource_cloud_stack.go +++ b/internal/resources/cloud/resource_cloud_stack.go @@ -11,7 +11,7 @@ import ( "strings" "time" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" "github.com/grafana/terraform-provider-grafana/v3/internal/common" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" diff --git a/internal/resources/cloud/resource_cloud_stack_service_account.go b/internal/resources/cloud/resource_cloud_stack_service_account.go index cc639eb27..75692a93f 100644 --- a/internal/resources/cloud/resource_cloud_stack_service_account.go +++ b/internal/resources/cloud/resource_cloud_stack_service_account.go @@ -7,7 +7,7 @@ import ( "strconv" "time" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" goapi "github.com/grafana/grafana-openapi-client-go/client" "github.com/grafana/terraform-provider-grafana/v3/internal/common" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/internal/resources/cloud/resource_cloud_stack_service_account_test.go b/internal/resources/cloud/resource_cloud_stack_service_account_test.go index ba92fdacd..f46bbc0a4 100644 --- a/internal/resources/cloud/resource_cloud_stack_service_account_test.go +++ b/internal/resources/cloud/resource_cloud_stack_service_account_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" "github.com/grafana/grafana-openapi-client-go/client/service_accounts" "github.com/grafana/terraform-provider-grafana/v3/internal/common" "github.com/grafana/terraform-provider-grafana/v3/internal/resources/cloud" diff --git a/internal/resources/cloud/resource_cloud_stack_service_account_token.go b/internal/resources/cloud/resource_cloud_stack_service_account_token.go index 01bb0169e..c3d7c6004 100644 --- a/internal/resources/cloud/resource_cloud_stack_service_account_token.go +++ b/internal/resources/cloud/resource_cloud_stack_service_account_token.go @@ -6,7 +6,7 @@ import ( "strconv" "time" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" "github.com/grafana/terraform-provider-grafana/v3/internal/common" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/internal/resources/cloud/resource_cloud_stack_test.go b/internal/resources/cloud/resource_cloud_stack_test.go index 03e07cda5..eaea88e7d 100644 --- a/internal/resources/cloud/resource_cloud_stack_test.go +++ b/internal/resources/cloud/resource_cloud_stack_test.go @@ -9,7 +9,7 @@ import ( "testing" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" "github.com/grafana/terraform-provider-grafana/v3/internal/common" "github.com/grafana/terraform-provider-grafana/v3/internal/resources/cloud" "github.com/grafana/terraform-provider-grafana/v3/internal/testutils" diff --git a/internal/resources/cloud/resource_synthetic_monitoring_installation.go b/internal/resources/cloud/resource_synthetic_monitoring_installation.go index 6d29d9ede..85081152c 100644 --- a/internal/resources/cloud/resource_synthetic_monitoring_installation.go +++ b/internal/resources/cloud/resource_synthetic_monitoring_installation.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" SMAPI "github.com/grafana/synthetic-monitoring-api-go-client" "github.com/grafana/terraform-provider-grafana/v3/internal/common" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/internal/resources/cloud/resource_synthetic_monitoring_installation_test.go b/internal/resources/cloud/resource_synthetic_monitoring_installation_test.go index 7c1bb1b50..c38357dbc 100644 --- a/internal/resources/cloud/resource_synthetic_monitoring_installation_test.go +++ b/internal/resources/cloud/resource_synthetic_monitoring_installation_test.go @@ -3,7 +3,7 @@ package cloud_test import ( "testing" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" "github.com/grafana/terraform-provider-grafana/v3/internal/testutils" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" diff --git a/pkg/generate/cloud.go b/pkg/generate/cloud.go index 62a434d5a..5a0a0028d 100644 --- a/pkg/generate/cloud.go +++ b/pkg/generate/cloud.go @@ -9,7 +9,7 @@ import ( "strconv" "time" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" "github.com/grafana/grafana-openapi-client-go/client/service_accounts" "github.com/grafana/terraform-provider-grafana/v3/internal/resources/cloud" "github.com/grafana/terraform-provider-grafana/v3/pkg/generate/postprocessing" diff --git a/pkg/provider/configure_clients.go b/pkg/provider/configure_clients.go index 3ecdc10f6..7155da592 100644 --- a/pkg/provider/configure_clients.go +++ b/pkg/provider/configure_clients.go @@ -13,7 +13,7 @@ import ( "time" onCallAPI "github.com/grafana/amixr-api-go-client" - "github.com/grafana/grafana-com-public-clients/go/gcom" + gcom "github.com/grafana/grafana-com-public-clients/go" goapi "github.com/grafana/grafana-openapi-client-go/client" "github.com/grafana/machine-learning-go-client/mlapi" slo "github.com/grafana/slo-openapi-client/go"