You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/existing-cluster-with-base-and-infra/README.md
+77-7Lines changed: 77 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,26 +7,96 @@ module with Infrastructure monitoring enabled.
7
7
The current example deploys the [AWS Distro for OpenTelemetry Operator](https://docs.aws.amazon.com/eks/latest/userguide/opentelemetry.html) for Amazon EKS with its requirements and make use of existing
8
8
Managed Service for Prometheus and Amazon Managed Grafana workspaces.
9
9
10
-
It also uses the `infrastructure monitoring`, one of our [workloads modules](../../modules/workloads/)
10
+
It is based on the `infrastructure monitoring`, one of our [workloads modules](../../modules/workloads/)
11
11
to provide an existing EKS cluster with an OpenTelemetry collector,
12
12
curated Grafana dashboards, Prometheus alerting and recording rules with multiple
13
-
configuration options.
14
-
15
-
#### ⚠️ Grafana API Key
13
+
configuration options on the cluster infrastructure.
16
14
17
15
18
16
## Prerequisites
19
17
20
-
1. EKS cluster
21
-
2. Prometheus
22
-
3. Grafana
18
+
Ensure that you have the following tools installed locally:
1. Amazon Managed Service for Prometheus workspace
45
+
46
+
If you have an existing workspace, add `managed_prometheus_workspace_id=ws-xxx`
47
+
or use an environment variable `export TF_VAR_managed_prometheus_workspace_id=ws-xxx`.
48
+
49
+
If you don't specify anything a new workspace will be created for you.
50
+
51
+
52
+
1. Amazon Managed Grafana workspace
53
+
54
+
55
+
If you have an existing workspace, add `managed_grafana_workspace_id=g-xxx`
56
+
or use an environment variable `export TF_VAR_managed_grafana_workspace_id=g-xxx`.
57
+
58
+
If you don't specify anything a new workspace will be created for you.
59
+
60
+
61
+
1. Grafana API Key
62
+
<!-- TODO: Remove section when CP Grafana API keys is supported by Terraform -->
63
+
64
+
- Give admin access to the SSO user you set up when creating the Amazon Managed Grafana Workspace:
65
+
- In the AWS Console, navigate to Amazon Grafana. In the left navigation bar, click **All workspaces**, then click on the workspace name you are using for this example.
66
+
- Under **Authentication** within **AWS Single Sign-On (SSO)**, click **Configure users and user groups**
67
+
- Check the box next to the SSO user you created and click **Make admin**
68
+
- From the workspace in the AWS console, click on the `Grafana workspace URL` to open the workspace
69
+
- If you don't see the gear icon in the left navigation bar, log out and log back in.
70
+
- Click on the gear icon, then click on the **API keys** tab.
71
+
- Click **Add API key**, fill in the _Key name_ field and select _Admin_ as the Role.
72
+
- Copy your API key into `terraform.tfvars` under the `grafana_api_key` variable (`grafana_api_key="xxx"`) or set as an environment variable on your CLI (`export TF_VAR_grafana_api_key="xxx"`)
73
+
23
74
24
75
## Deploy
25
76
77
+
```sh
78
+
terraform apply -var terraform.tfvars
79
+
```
80
+
81
+
or if you had setup environment variables
82
+
26
83
```sh
27
84
terraform apply
28
85
```
29
86
87
+
## Advanced configuration
88
+
89
+
1. Cross-region Managed Prometheus workspace
90
+
91
+
If your existing Managed Prometheus workspace is in another AWS Region,
92
+
add this `managed_prometheus_region=xxx` and `managed_prometheus_workspace_id=ws-xxx`.
93
+
94
+
1. Cross-region Managed Grafana workspace
95
+
96
+
If your existing Managed Prometheus workspace is in another AWS Region,
97
+
add this `managed_prometheus_region=xxx` and `managed_prometheus_workspace_id=ws-xxx`.
98
+
99
+
30
100
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
0 commit comments