Skip to content

Commit 49a7896

Browse files
committed
fix(cockpit): resolve linting errors and documentation format issues
1 parent 6901077 commit 49a7896

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

docs/resources/cockpit_grafana_user.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ The `scaleway_cockpit_grafana_user` resource allows you to create and manage [Gr
1313

1414
Refer to Cockpit's [product documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/) and [API documentation](https://www.scaleway.com/en/developers/api/cockpit/regional-api) for more information.
1515

16-
## Migration Example
16+
## Example Usage
17+
18+
### Migration to IAM Authentication
1719

1820
Instead of managing Grafana users, retrieve your Grafana URL using the data source:
1921

@@ -36,9 +38,7 @@ output "grafana_url" {
3638
}
3739
```
3840

39-
## Example Usage (Deprecated)
40-
41-
### Create a Grafana user
41+
### Create a Grafana user (Deprecated)
4242

4343
The following command allows you to create a Grafana user within a specific Scaleway Project.
4444

internal/services/cockpit/grafana_data_source.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ func dataSourceCockpitGrafanaRead(ctx context.Context, d *schema.ResourceData, m
4343
if err != nil {
4444
return diag.FromErr(err)
4545
}
46+
4647
projectID = defaultProjectID
4748
}
4849

@@ -53,6 +54,7 @@ func dataSourceCockpitGrafanaRead(ctx context.Context, d *schema.ResourceData, m
5354
if httperrors.Is404(err) {
5455
return diag.Errorf("Grafana instance not found for project %s. Ensure that Cockpit is activated for this project.", projectID)
5556
}
57+
5658
return diag.FromErr(err)
5759
}
5860

internal/services/cockpit/grafana_data_source_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func TestAccDataSourceCockpitGrafana_Basic(t *testing.T) {
1414

1515
projectName := "tf_tests_cockpit_grafana_data_basic"
1616

17-
resource.ParallelTest(t, resource.TestCase{
17+
resource.Test(t, resource.TestCase{
1818
ProtoV6ProviderFactories: tt.ProviderFactories,
1919
Steps: []resource.TestStep{
2020
{
@@ -44,7 +44,7 @@ func TestAccDataSourceCockpitGrafana_DefaultProject(t *testing.T) {
4444
tt := acctest.NewTestTools(t)
4545
defer tt.Cleanup()
4646

47-
resource.ParallelTest(t, resource.TestCase{
47+
resource.Test(t, resource.TestCase{
4848
ProtoV6ProviderFactories: tt.ProviderFactories,
4949
Steps: []resource.TestStep{
5050
{

templates/resources/cockpit_grafana_user.md.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ The `scaleway_cockpit_grafana_user` resource allows you to create and manage [Gr
1414

1515
Refer to Cockpit's [product documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/) and [API documentation](https://www.scaleway.com/en/developers/api/cockpit/regional-api) for more information.
1616

17-
## Migration Example
17+
## Example Usage
18+
19+
### Migration to IAM Authentication
1820

1921
Instead of managing Grafana users, retrieve your Grafana URL using the data source:
2022

@@ -37,9 +39,7 @@ output "grafana_url" {
3739
}
3840
```
3941

40-
## Example Usage (Deprecated)
41-
42-
### Create a Grafana user
42+
### Create a Grafana user (Deprecated)
4343

4444
The following command allows you to create a Grafana user within a specific Scaleway Project.
4545

0 commit comments

Comments
 (0)