Skip to content

Commit 0f9f701

Browse files
authored
Docs: Fix order on Connections (Metrics Endpoint) docs (#1904)
1 parent 58cbf86 commit 0f9f701

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

docs/index.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,22 @@ resource "grafana_cloud_provider_aws_cloudwatch_scrape_job" "test" {
355355

356356
### Managing Connections
357357

358+
#### Obtaining Connections access token
359+
360+
Before using the Terraform Provider to manage Grafana Connections resources, such as metrics endpoint scrape jobs, you need to create an access policy token on the Grafana Cloud Portal. This token is used to authenticate the provider to the Grafana Connections API.
361+
[These docs](https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/authorize-services/#create-an-access-policy-for-a-stack) will guide you on how to create
362+
an access policy. The required permissions, or scopes, are `integration-management:read`, `integration-management:write` and `stacks:read`.
363+
364+
Also, by default the Access Policies UI will not show those scopes, instead, search for it using the `Add Scope` textbox, as shown in the following image:
365+
366+
<img src="https://grafana.com/media/docs/grafana-cloud/connections/connections-terraform-access-policy-create.png" width="700"/>
367+
368+
1. Use the `Add Scope` textbox to search for the permissions you need to add to the access policy: `integration-management:read`, `integration-management:write` and `stacks:read`.
369+
1. Once done, you should see the scopes selected with checkboxes.
370+
371+
Having created an Access Policy, you can now create a token that will be used to authenticate the provider to the Connections API. You can do so just after creating the access policy, following
372+
the in-screen instructions, of following [this guide](https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/authorize-services/#create-one-or-more-access-policy-tokens).
373+
358374
#### Obtaining Connections API hostname
359375

360376
Having created the token, we can find the correct Connections API hostname by running the following script, that requires `curl` and [`jq`](https://jqlang.github.io/jq/) installed:
@@ -377,22 +393,6 @@ For example, in the following response, the correct hostname for the `examplesta
377393
]
378394
```
379395

380-
#### Obtaining Connections access token
381-
382-
Before using the Terraform Provider to manage Grafana Connections resources, such as metrics endpoint scrape jobs, you need to create an access policy token on the Grafana Cloud Portal. This token is used to authenticate the provider to the Grafana Connections API.
383-
[These docs](https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/authorize-services/#create-an-access-policy-for-a-stack) will guide you on how to create
384-
an access policy. The required permissions, or scopes, are `integration-management:read`, `integration-management:write` and `stacks:read`.
385-
386-
Also, by default the Access Policies UI will not show those scopes, instead, search for it using the `Add Scope` textbox, as shown in the following image:
387-
388-
<img src="https://grafana.com/media/docs/grafana-cloud/connections/connections-terraform-access-policy-create.png" width="700"/>
389-
390-
1. Use the `Add Scope` textbox (1) to search for the permissions you need to add to the access policy.
391-
1. Make sure that you configure the three required scopes. Once done, you'll see the selected scopes as in (2).
392-
393-
Having created an Access Policy, you can now create a token that will be used to authenticate the provider to the Connections API. You can do so just after creating the access policy, following
394-
the in-screen instructions, of following [this guide](https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/authorize-services/#create-one-or-more-access-policy-tokens).
395-
396396
#### Configuring the Provider to use the Connections API
397397

398398
Once you have the token and Connections API hostname, you can configure the provider as follows:
@@ -436,4 +436,4 @@ To create one, follow the instructions in the [obtaining cloud provider access t
436436

437437
An access policy token created on the [Grafana Cloud Portal](https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/authorize-services/) to manage
438438
connections resources, such as Metrics Endpoint jobs.
439-
For guidance on creating one, see section [obtaining connections access token](#obtaining-connections-access-token)
439+
For guidance on creating one, see section [obtaining connections access token](#obtaining-connections-access-token).

templates/index.md.tmpl

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,22 @@ The following are examples on how the *Account* and *Scrape Job* resources can b
8989

9090
### Managing Connections
9191

92+
#### Obtaining Connections access token
93+
94+
Before using the Terraform Provider to manage Grafana Connections resources, such as metrics endpoint scrape jobs, you need to create an access policy token on the Grafana Cloud Portal. This token is used to authenticate the provider to the Grafana Connections API.
95+
[These docs](https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/authorize-services/#create-an-access-policy-for-a-stack) will guide you on how to create
96+
an access policy. The required permissions, or scopes, are `integration-management:read`, `integration-management:write` and `stacks:read`.
97+
98+
Also, by default the Access Policies UI will not show those scopes, instead, search for it using the `Add Scope` textbox, as shown in the following image:
99+
100+
<img src="https://grafana.com/media/docs/grafana-cloud/connections/connections-terraform-access-policy-create.png" width="700"/>
101+
102+
1. Use the `Add Scope` textbox to search for the permissions you need to add to the access policy: `integration-management:read`, `integration-management:write` and `stacks:read`.
103+
1. Once done, you should see the scopes selected with checkboxes.
104+
105+
Having created an Access Policy, you can now create a token that will be used to authenticate the provider to the Connections API. You can do so just after creating the access policy, following
106+
the in-screen instructions, of following [this guide](https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/authorize-services/#create-one-or-more-access-policy-tokens).
107+
92108
#### Obtaining Connections API hostname
93109

94110
Having created the token, we can find the correct Connections API hostname by running the following script, that requires `curl` and [`jq`](https://jqlang.github.io/jq/) installed:
@@ -111,22 +127,6 @@ For example, in the following response, the correct hostname for the `examplesta
111127
]
112128
```
113129

114-
#### Obtaining Connections access token
115-
116-
Before using the Terraform Provider to manage Grafana Connections resources, such as metrics endpoint scrape jobs, you need to create an access policy token on the Grafana Cloud Portal. This token is used to authenticate the provider to the Grafana Connections API.
117-
[These docs](https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/authorize-services/#create-an-access-policy-for-a-stack) will guide you on how to create
118-
an access policy. The required permissions, or scopes, are `integration-management:read`, `integration-management:write` and `stacks:read`.
119-
120-
Also, by default the Access Policies UI will not show those scopes, instead, search for it using the `Add Scope` textbox, as shown in the following image:
121-
122-
<img src="https://grafana.com/media/docs/grafana-cloud/connections/connections-terraform-access-policy-create.png" width="700"/>
123-
124-
1. Use the `Add Scope` textbox (1) to search for the permissions you need to add to the access policy.
125-
1. Make sure that you configure the three required scopes. Once done, you'll see the selected scopes as in (2).
126-
127-
Having created an Access Policy, you can now create a token that will be used to authenticate the provider to the Connections API. You can do so just after creating the access policy, following
128-
the in-screen instructions, of following [this guide](https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/authorize-services/#create-one-or-more-access-policy-tokens).
129-
130130
#### Configuring the Provider to use the Connections API
131131

132132
Once you have the token and Connections API hostname, you can configure the provider as follows:
@@ -170,4 +170,4 @@ To create one, follow the instructions in the [obtaining cloud provider access t
170170

171171
An access policy token created on the [Grafana Cloud Portal](https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/authorize-services/) to manage
172172
connections resources, such as Metrics Endpoint jobs.
173-
For guidance on creating one, see section [obtaining connections access token](#obtaining-connections-access-token)
173+
For guidance on creating one, see section [obtaining connections access token](#obtaining-connections-access-token).

0 commit comments

Comments
 (0)