[Docs] Edit terraform example and doc for file generation (#58822)

* docs: update terraform example and doc for file generation

* docs: updated the documnettaion to include the help command with fields included

* Update pkg/cmd/grafana-cli/commands/commands.go

* docs: add help command
This commit is contained in:
Eric Leijonmarck 2022-11-17 10:24:07 +00:00 committed by GitHub
parent b398e8640d
commit 2a6ed76e54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 6 deletions

View File

@ -201,6 +201,30 @@ var adminCommands = []*cli.Command{
{
Name: "conflicts",
Usage: "runs a conflict resolution to find users with multiple entries",
CustomHelpTemplate: `
This command will find users with multiple entries in the database and try to resolve the conflicts.
explanation of each field:
explanation of each field:
* email - the users email
* login - the users login/username
* last_seen_at - the users last login
* auth_module - if the user was created/signed in using an authentication provider
* conflict_email - a boolean if we consider the email to be a conflict
* conflict_login - a boolean if we consider the login to be a conflict
# lists all the conflicting users
grafana-cli user-manager conflicts list
# creates a conflict patch file to edit
grafana-cli user-manager conflicts generate-file
# reads edited conflict patch file for validation
grafana-cli user-manager conflicts validate-file <filepath>
# validates and ingests edited patch file
grafana-cli user-manager conflicts ingest-file <filepath>
`,
Subcommands: []*cli.Command{
{
Name: "list",

View File

@ -16,7 +16,7 @@ provider "grafana" {
// Creating the grafana-login
resource "grafana_user" "grafana-login" {
email = "grafana_login@grafana.com"
login = "GRAFANA_LOGIN@grafana.com"
login = "GRAFANA_LOGIN"
password = "grafana_login@grafana.com"
is_admin = false
}
@ -24,7 +24,7 @@ resource "grafana_user" "grafana-login" {
// Creating the grafana-login
resource "grafana_user" "grafana-login-2" {
email = "grafana_login_2@grafana.com"
login = "grafana_login@grafana.com"
login = "grafana_login"
password = "grafana_login@grafana.com"
is_admin = false
}
@ -33,7 +33,7 @@ resource "grafana_user" "grafana-login-2" {
// Creating the grafana-email
resource "grafana_user" "grafana-email" {
email = "grafana_email@grafana.com"
login = "grafana_email@grafana.com"
login = "user_login_a"
password = "grafana_email@grafana.com"
is_admin = false
}
@ -41,7 +41,7 @@ resource "grafana_user" "grafana-email" {
// Creating the grafana-email
resource "grafana_user" "grafana-email-2" {
email = "GRAFANA_EMAIL@grafana.com"
login = "grafana_email_2@grafana.com"
login = "user_login_b"
password = "grafana_email@grafana.com"
is_admin = false
}
@ -50,7 +50,7 @@ resource "grafana_user" "grafana-email-2" {
// Creating the grafana-user
resource "grafana_user" "grafana-user" {
email = "grafana_user@grafana.com"
login = "grafana_user@grafana.com"
login = "grafana_user"
password = "grafana_user@grafana.com"
is_admin = false
}
@ -58,7 +58,7 @@ resource "grafana_user" "grafana-user" {
// Creating the grafana-user
resource "grafana_user" "grafana-user-2" {
email = "GRAFANA_USER@grafana.com"
login = "GRAFANA_USER@grafana.com"
login = "GRAFANA_USER"
password = "grafana_user@grafana.com"
is_admin = false
}

View File

@ -203,6 +203,12 @@ func getDocumentationForFile() string {
#
# If you feel like you want to wait with a specific block,
# delete all lines regarding that conflict block.
# email - the users email
# login - the users login/username
# last_seen_at - the users last login
# auth_module - if the user was created/signed in using an authentication provider
# conflict_email - a boolean if we consider the email to be a conflict
# conflict_login - a boolean if we consider the login to be a conflict
#
`
}