diff --git a/go.mod b/go.mod index 0c99dbec..69328cd0 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/robfig/cron v1.2.0 github.com/spectrocloud/gomi v1.14.1-0.20240214074114-c19394812368 github.com/spectrocloud/hapi v1.14.1-0.20240214071352-81f589b1d86d - github.com/spectrocloud/palette-sdk-go v0.0.0-20241118141206-8f1212dd4e29 + github.com/spectrocloud/palette-sdk-go v0.0.0-20241118165324-009eeef47438 github.com/stretchr/testify v1.9.0 gotest.tools v2.2.0+incompatible k8s.io/api v0.23.5 diff --git a/go.sum b/go.sum index d2965b51..c9484ae0 100644 --- a/go.sum +++ b/go.sum @@ -600,8 +600,8 @@ github.com/spectrocloud/gomi v1.14.1-0.20240214074114-c19394812368 h1:eY0BOyEbGu github.com/spectrocloud/gomi v1.14.1-0.20240214074114-c19394812368/go.mod h1:LlZ9We4kDaELYi7Is0SVmnySuDhwphJLS6ZT4wXxFIk= github.com/spectrocloud/hapi v1.14.1-0.20240214071352-81f589b1d86d h1:OMRbHxMJ1a+G1BYzvUYuMM0wLkYJPdnEOFx16faQ/UY= github.com/spectrocloud/hapi v1.14.1-0.20240214071352-81f589b1d86d/go.mod h1:MktpRPnSXDTHsQrFSD+daJFQ1zMLSR+1gWOL31jVvWE= -github.com/spectrocloud/palette-sdk-go v0.0.0-20241118141206-8f1212dd4e29 h1:i7ZcuLdZ0se7xhMPPdIYIkoA056THvrnJI2Ruezyf+Y= -github.com/spectrocloud/palette-sdk-go v0.0.0-20241118141206-8f1212dd4e29/go.mod h1:dSlNvDS0qwUWTbrYI6P8x981mcbbRHFrBg67v5zl81U= +github.com/spectrocloud/palette-sdk-go v0.0.0-20241118165324-009eeef47438 h1:TboPvQjtapjSclbQ9aviF9mrnrS0Xz9xLYfKxF/gdRY= +github.com/spectrocloud/palette-sdk-go v0.0.0-20241118165324-009eeef47438/go.mod h1:dSlNvDS0qwUWTbrYI6P8x981mcbbRHFrBg67v5zl81U= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= diff --git a/spectrocloud/data_source_permission.go b/spectrocloud/data_source_permission.go index 6f7cb06e..38990000 100644 --- a/spectrocloud/data_source_permission.go +++ b/spectrocloud/data_source_permission.go @@ -5,6 +5,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + "github.com/spectrocloud/palette-sdk-go/client" "strings" ) @@ -49,7 +50,7 @@ func dataSourcePermissionRead(_ context.Context, d *schema.ResourceData, m inter scope := d.Get("scope").(string) if v, ok := d.GetOk("name"); ok { - permission, err := c.GetPermissionByName(v.(string), scope) + permission, err := c.GetPermissionByName(v.(string), client.PermissionScope(scope)) if err != nil { return diag.FromErr(err) }