Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API keys: Add deprecation message of terraform using api keys #872

Merged
merged 3 commits into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 0 additions & 61 deletions docs/resources/api_key.md

This file was deleted.

45 changes: 0 additions & 45 deletions docs/resources/cloud_api_key.md

This file was deleted.

1 change: 1 addition & 0 deletions internal/resources/cloud/resource_cloud_api_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func ResourceAPIKey() *schema.Resource {
Importer: &schema.ResourceImporter{
StateContext: schema.ImportStatePassthroughContext,
},
DeprecationMessage: "Use `grafana_cloud_stack_service_account` together with `grafana_cloud_stack_service_account_token` resources instead see https://grafana.com/docs/grafana/next/administration/api-keys/#migrate-api-keys-to-grafana-service-accounts-using-terraform",

Schema: map[string]*schema.Schema{
"cloud_org_slug": {
Expand Down
7 changes: 4 additions & 3 deletions internal/resources/grafana/resource_api_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ Manages Grafana API Keys.
* [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/auth/)
`,

CreateContext: resourceAPIKeyCreate,
ReadContext: resourceAPIKeyRead,
DeleteContext: resourceAPIKeyDelete,
CreateContext: resourceAPIKeyCreate,
ReadContext: resourceAPIKeyRead,
DeleteContext: resourceAPIKeyDelete,
DeprecationMessage: "Use `grafana_service_account` together with `grafana_service_account_token` instead, see https://grafana.com/docs/grafana/next/administration/api-keys/#migrate-api-keys-to-grafana-service-accounts-using-terraform",

Schema: map[string]*schema.Schema{
"org_id": orgIDAttribute(),
Expand Down