From 9c03c732105fa3077cfa3c292b64c6985562acb5 Mon Sep 17 00:00:00 2001 From: Julien Duchesne Date: Tue, 13 Aug 2024 03:12:27 -0400 Subject: [PATCH] Document that the org and user resources aren't usable in Cloud (#1703) --- docs/data-sources/user.md | 2 ++ docs/data-sources/users.md | 2 ++ docs/resources/organization.md | 4 +++- docs/resources/user.md | 2 ++ internal/resources/grafana/data_source_user.go | 1 + internal/resources/grafana/data_source_users.go | 1 + internal/resources/grafana/resource_organization.go | 3 ++- internal/resources/grafana/resource_user.go | 1 + 8 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/data-sources/user.md b/docs/data-sources/user.md index bd40ddc6b..079f0804b 100644 --- a/docs/data-sources/user.md +++ b/docs/data-sources/user.md @@ -6,6 +6,7 @@ description: |- Official documentation https://grafana.com/docs/grafana/latest/administration/user-management/server-user-management/HTTP API https://grafana.com/docs/grafana/latest/developers/http_api/user/ This data source uses Grafana's admin APIs for reading users which does not currently work with API Tokens. You must use basic auth. + This data source is also not compatible with Grafana Cloud, as it does not allow basic auth. --- # grafana_user (Data Source) @@ -15,6 +16,7 @@ description: |- This data source uses Grafana's admin APIs for reading users which does not currently work with API Tokens. You must use basic auth. +This data source is also not compatible with Grafana Cloud, as it does not allow basic auth. ## Example Usage diff --git a/docs/data-sources/users.md b/docs/data-sources/users.md index d29bd96b7..3d8a86251 100644 --- a/docs/data-sources/users.md +++ b/docs/data-sources/users.md @@ -6,6 +6,7 @@ description: |- Official documentation https://grafana.com/docs/grafana/latest/administration/user-management/server-user-management/HTTP API https://grafana.com/docs/grafana/latest/developers/http_api/user/ This data source uses Grafana's admin APIs for reading users which does not currently work with API Tokens. You must use basic auth. + This data source is also not compatible with Grafana Cloud, as it does not allow basic auth. --- # grafana_users (Data Source) @@ -15,6 +16,7 @@ description: |- This data source uses Grafana's admin APIs for reading users which does not currently work with API Tokens. You must use basic auth. +This data source is also not compatible with Grafana Cloud, as it does not allow basic auth. ## Example Usage diff --git a/docs/resources/organization.md b/docs/resources/organization.md index f8cb69d0d..a2208444b 100644 --- a/docs/resources/organization.md +++ b/docs/resources/organization.md @@ -7,6 +7,7 @@ description: |- This resource represents an instance-scoped resource and uses Grafana's admin APIs. It does not work with API tokens or service accounts which are org-scoped. You must use basic auth. + This resource is also not compatible with Grafana Cloud, as it does not allow basic auth. --- # grafana_organization (Resource) @@ -16,7 +17,8 @@ description: |- This resource represents an instance-scoped resource and uses Grafana's admin APIs. It does not work with API tokens or service accounts which are org-scoped. -You must use basic auth. +You must use basic auth. +This resource is also not compatible with Grafana Cloud, as it does not allow basic auth. ## Example Usage diff --git a/docs/resources/user.md b/docs/resources/user.md index 144401275..6d48d15d5 100644 --- a/docs/resources/user.md +++ b/docs/resources/user.md @@ -7,6 +7,7 @@ description: |- This resource represents an instance-scoped resource and uses Grafana's admin APIs. It does not work with API tokens or service accounts which are org-scoped. You must use basic auth. + This resource is also not compatible with Grafana Cloud, as it does not allow basic auth. --- # grafana_user (Resource) @@ -17,6 +18,7 @@ description: |- This resource represents an instance-scoped resource and uses Grafana's admin APIs. It does not work with API tokens or service accounts which are org-scoped. You must use basic auth. +This resource is also not compatible with Grafana Cloud, as it does not allow basic auth. ## Example Usage diff --git a/internal/resources/grafana/data_source_user.go b/internal/resources/grafana/data_source_user.go index 2b1897bd8..55813ce98 100644 --- a/internal/resources/grafana/data_source_user.go +++ b/internal/resources/grafana/data_source_user.go @@ -18,6 +18,7 @@ func datasourceUser() *common.DataSource { This data source uses Grafana's admin APIs for reading users which does not currently work with API Tokens. You must use basic auth. +This data source is also not compatible with Grafana Cloud, as it does not allow basic auth. `, ReadContext: dataSourceUserRead, Schema: map[string]*schema.Schema{ diff --git a/internal/resources/grafana/data_source_users.go b/internal/resources/grafana/data_source_users.go index 996778b87..93200aedf 100644 --- a/internal/resources/grafana/data_source_users.go +++ b/internal/resources/grafana/data_source_users.go @@ -24,6 +24,7 @@ func datasourceUsers() *common.DataSource { This data source uses Grafana's admin APIs for reading users which does not currently work with API Tokens. You must use basic auth. +This data source is also not compatible with Grafana Cloud, as it does not allow basic auth. `, Schema: map[string]*schema.Schema{ diff --git a/internal/resources/grafana/resource_organization.go b/internal/resources/grafana/resource_organization.go index c3c3a67da..c5cbbaebb 100644 --- a/internal/resources/grafana/resource_organization.go +++ b/internal/resources/grafana/resource_organization.go @@ -46,7 +46,8 @@ func resourceOrganization() *common.Resource { This resource represents an instance-scoped resource and uses Grafana's admin APIs. It does not work with API tokens or service accounts which are org-scoped. -You must use basic auth. +You must use basic auth. +This resource is also not compatible with Grafana Cloud, as it does not allow basic auth. `, CreateContext: CreateOrganization, diff --git a/internal/resources/grafana/resource_user.go b/internal/resources/grafana/resource_user.go index 17df70d4a..0a38ee057 100644 --- a/internal/resources/grafana/resource_user.go +++ b/internal/resources/grafana/resource_user.go @@ -25,6 +25,7 @@ func resourceUser() *common.Resource { This resource represents an instance-scoped resource and uses Grafana's admin APIs. It does not work with API tokens or service accounts which are org-scoped. You must use basic auth. +This resource is also not compatible with Grafana Cloud, as it does not allow basic auth. `, CreateContext: CreateUser,