Skip to content

Commit

Permalink
Update SA command
Browse files Browse the repository at this point in the history
  • Loading branch information
bonclay7 committed May 16, 2024
1 parent 198df06 commit 3f26a9e
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions docs/eks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,21 @@ for Service Accounts and (`CreateWorkspaceApiKey, DeleteWorkspaceApiKey`) for Gr

```console
# skip this command if you already have a service token
GRAFANA_SA_ID=$(aws grafana create-workspace-service-account --workspace-id $TF_VAR_managed_grafana_workspace_id --grafana-role ADMIN --name terraform-accelerator-eks --query 'id' --output text)
GRAFANA_SA_ID=$(aws grafana create-workspace-service-account \
--workspace-id $TF_VAR_managed_grafana_workspace_id \
--grafana-role ADMIN \
--name terraform-accelerator-eks \
--query 'id' \
--output text)

# creates a new token for running Terraform
export TF_VAR_grafana_api_key=`aws grafana create-workspace-service-account-token --workspace-id $TF_VAR_managed_grafana_workspace_id --name --key-name "observability-accelerator-$(date +%s)" --seconds-to-live 7200 --service-account-id $GRAFANA_SA_ID --query 'serviceAccountToken.key' --output text`
export TF_VAR_grafana_api_key=$(aws grafana create-workspace-service-account-token \
--workspace-id $TF_VAR_managed_grafana_workspace_id \
--name "observability-accelerator-$(date +%s)" \
--seconds-to-live 7200 \
--service-account-id $GRAFANA_SA_ID \
--query 'serviceAccountToken.key' \
--output text)
```

=== "v8.4 workspaces"
Expand Down

0 comments on commit 3f26a9e

Please sign in to comment.