Skip to content

Commit 20d1c5f

Browse files
Tests: Replace ProviderFactories with ProtoV5ProviderFactories (#1423)
* Tests: Replace `ProviderFactories` with `ProtoV5ProviderFactories` This is needed for the migration to the new Terraform plugin framework The `ProviderFactories` attribute directly refers to an old SDKv2 provider, while the `ProtoV5ProviderFactories` attribute allows to reference the full provider setup (muxed from the SDKv2 and Plugin Framework resources) * Generate docs
1 parent bd938ad commit 20d1c5f

File tree

81 files changed

+339
-293
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+339
-293
lines changed

docs/resources/contact_point.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ page_title: "grafana_contact_point Resource - terraform-provider-grafana"
44
subcategory: "Alerting"
55
description: |-
66
Manages Grafana Alerting contact points.
7-
Official documentation https://grafana.com/docs/grafana/next/alerting/fundamentals/contact-points/HTTP API https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/#contact-points
7+
Official documentation https://grafana.com/docs/grafana/next/alerting/fundamentals/notifications/contact-points/HTTP API https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/#contact-points
88
This resource requires Grafana 9.1.0 or later.
99
---
1010

1111
# grafana_contact_point (Resource)
1212

1313
Manages Grafana Alerting contact points.
1414

15-
* [Official documentation](https://grafana.com/docs/grafana/next/alerting/fundamentals/contact-points/)
15+
* [Official documentation](https://grafana.com/docs/grafana/next/alerting/fundamentals/notifications/contact-points/)
1616
* [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/#contact-points)
1717

1818
This resource requires Grafana 9.1.0 or later.

go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ require (
2121
github.com/hashicorp/hcl/v2 v2.20.0
2222
github.com/hashicorp/terraform-plugin-docs v0.18.0
2323
github.com/hashicorp/terraform-plugin-framework v1.6.1
24+
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0
2425
github.com/hashicorp/terraform-plugin-go v0.22.1
2526
github.com/hashicorp/terraform-plugin-mux v0.15.0
2627
github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ github.com/hashicorp/terraform-plugin-docs v0.18.0 h1:2bINhzXc+yDeAcafurshCrIjtd
149149
github.com/hashicorp/terraform-plugin-docs v0.18.0/go.mod h1:iIUfaJpdUmpi+rI42Kgq+63jAjI8aZVTyxp3Bvk9Hg8=
150150
github.com/hashicorp/terraform-plugin-framework v1.6.1 h1:hw2XrmUu8d8jVL52ekxim2IqDc+2Kpekn21xZANARLU=
151151
github.com/hashicorp/terraform-plugin-framework v1.6.1/go.mod h1:aJI+n/hBPhz1J+77GdgNfk5svW12y7fmtxe/5L5IuwI=
152+
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEzl7snOdOoUfE2Jgeto6JOjLVQ39Ls2nksc=
153+
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0/go.mod h1:jfHGE/gzjxYz6XoUwi/aYiiKrJDeutQNUtGQXkaHklg=
152154
github.com/hashicorp/terraform-plugin-go v0.22.1 h1:iTS7WHNVrn7uhe3cojtvWWn83cm2Z6ryIUDTRO0EV7w=
153155
github.com/hashicorp/terraform-plugin-go v0.22.1/go.mod h1:qrjnqRghvQ6KnDbB12XeZ4FluclYwptntoWCr9QaXTI=
154156
github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0=

internal/provider/provider.go

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package provider
2+
3+
import (
4+
"context"
5+
6+
"github.com/hashicorp/terraform-plugin-framework/providerserver"
7+
"github.com/hashicorp/terraform-plugin-go/tfprotov5"
8+
"github.com/hashicorp/terraform-plugin-mux/tf5muxserver"
9+
"github.com/hashicorp/terraform-plugin-mux/tf6to5server"
10+
)
11+
12+
func MakeProviderServer(ctx context.Context, version string) (tfprotov5.ProviderServer, error) {
13+
// While we still have the SDK2 provider, we have to use the provider v5 protocol
14+
// See https://developer.hashicorp.com/terraform/plugin/mux/translating-protocol-version-6-to-5
15+
downgradedFrameworkProvider, err := tf6to5server.DowngradeServer(
16+
context.Background(),
17+
providerserver.NewProtocol6(FrameworkProvider(version)),
18+
)
19+
if err != nil {
20+
return nil, err
21+
}
22+
23+
providers := []func() tfprotov5.ProviderServer{
24+
func() tfprotov5.ProviderServer {
25+
return downgradedFrameworkProvider
26+
},
27+
Provider(version).GRPCProvider,
28+
}
29+
muxServer, err := tf5muxserver.NewMuxServer(ctx, providers...)
30+
if err != nil {
31+
return nil, err
32+
}
33+
return muxServer, nil
34+
}

internal/resources/cloud/data_source_cloud_ips_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestAccDataSourceIPsRead(t *testing.T) {
1616
testutils.CheckCloudAPITestsEnabled(t)
1717

1818
resource.ParallelTest(t, resource.TestCase{
19-
ProviderFactories: testutils.ProviderFactories,
19+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
2020
Steps: []resource.TestStep{
2121
{
2222
Config: testutils.TestAccExample(t, "data-sources/grafana_cloud_ips/data-source.tf"),

internal/resources/cloud/data_source_cloud_organization_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func TestAccDataSourceOrganization_Basic(t *testing.T) {
2020
`, os.Getenv("GRAFANA_CLOUD_ORG"))
2121

2222
resource.ParallelTest(t, resource.TestCase{
23-
ProviderFactories: testutils.ProviderFactories,
23+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
2424
Steps: []resource.TestStep{
2525
{
2626
Config: config,

internal/resources/cloud/data_source_cloud_stack_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ func TestAccDataSourceStack_Basic(t *testing.T) {
2020
PreCheck: func() {
2121
testAccDeleteExistingStacks(t, prefix)
2222
},
23-
ProviderFactories: testutils.ProviderFactories,
24-
CheckDestroy: testAccStackCheckDestroy(&stack),
23+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
24+
CheckDestroy: testAccStackCheckDestroy(&stack),
2525
Steps: []resource.TestStep{
2626
{
2727
Config: testAccDataSourceStackConfig(resourceName),

internal/resources/cloud/resource_cloud_access_policy_token_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func TestResourceAccessPolicyToken_Basic(t *testing.T) {
3838
}
3939

4040
resource.Test(t, resource.TestCase{
41-
ProviderFactories: testutils.ProviderFactories,
41+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
4242
CheckDestroy: resource.ComposeTestCheckFunc(
4343
testAccCloudAccessPolicyCheckDestroy("us", &policy),
4444
testAccCloudAccessPolicyTokenCheckDestroy("us", &policyToken),
@@ -123,7 +123,7 @@ func TestResourceAccessPolicyToken_NoExpiration(t *testing.T) {
123123
var policyToken gcom.AuthToken
124124

125125
resource.Test(t, resource.TestCase{
126-
ProviderFactories: testutils.ProviderFactories,
126+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
127127
Steps: []resource.TestStep{
128128
{
129129
Config: testAccCloudAccessPolicyTokenConfigBasic("initial-no-expiration", "", []string{"metrics:read"}, ""),

internal/resources/cloud/resource_cloud_api_key_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ func TestAccCloudApiKey_Basic(t *testing.T) {
3636
resourceName := prefix + acctest.RandStringFromCharSet(5, acctest.CharSetAlphaNum)
3737

3838
resource.ParallelTest(t, resource.TestCase{
39-
ProviderFactories: testutils.ProviderFactories,
40-
CheckDestroy: testAccCheckCloudAPIKeyDestroy(resourceName),
39+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
40+
CheckDestroy: testAccCheckCloudAPIKeyDestroy(resourceName),
4141
Steps: []resource.TestStep{
4242
{
4343
Config: testAccCloudAPIKeyConfig(resourceName, tt.role),

internal/resources/cloud/resource_cloud_plugin_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ func TestAccResourcePluginInstallation(t *testing.T) {
2323
pluginVersion := "1.2.5"
2424

2525
resource.ParallelTest(t, resource.TestCase{
26-
PreCheck: func() { testAccDeleteExistingStacks(t, stackPrefix) },
27-
ProviderFactories: testutils.ProviderFactories,
26+
PreCheck: func() { testAccDeleteExistingStacks(t, stackPrefix) },
27+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
2828
Steps: []resource.TestStep{
2929
{
3030
Config: testAccGrafanaCloudPluginInstallation(stackSlug, pluginSlug, pluginVersion),

internal/resources/cloud/resource_cloud_stack_api_key_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ func TestAccGrafanaAuthKeyFromCloud(t *testing.T) {
2626
PreCheck: func() {
2727
testAccDeleteExistingStacks(t, prefix)
2828
},
29-
ProviderFactories: testutils.ProviderFactories,
30-
CheckDestroy: testAccStackCheckDestroy(&stack),
29+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
30+
CheckDestroy: testAccStackCheckDestroy(&stack),
3131
Steps: []resource.TestStep{
3232
{
3333
Config: testAccGrafanaAuthKeyFromCloud(slug, slug),

internal/resources/cloud/resource_cloud_stack_service_account_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ func TestAccGrafanaServiceAccountFromCloud(t *testing.T) {
2525
PreCheck: func() {
2626
testAccDeleteExistingStacks(t, prefix)
2727
},
28-
ProviderFactories: testutils.ProviderFactories,
29-
CheckDestroy: testAccStackCheckDestroy(&stack),
28+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
29+
CheckDestroy: testAccStackCheckDestroy(&stack),
3030
Steps: []resource.TestStep{
3131
{
3232
Config: testAccGrafanaServiceAccountFromCloud(slug, slug, true),

internal/resources/cloud/resource_cloud_stack_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ func TestResourceStack_Basic(t *testing.T) {
5757
PreCheck: func() {
5858
testAccDeleteExistingStacks(t, prefix)
5959
},
60-
ProviderFactories: testutils.ProviderFactories,
61-
CheckDestroy: testAccStackCheckDestroy(&stack),
60+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
61+
CheckDestroy: testAccStackCheckDestroy(&stack),
6262
Steps: []resource.TestStep{
6363
// Create a basic stack
6464
{
@@ -130,7 +130,7 @@ func TestResourceStack_Basic(t *testing.T) {
130130

131131
func TestResourceStack_Invalid(t *testing.T) {
132132
resource.ParallelTest(t, resource.TestCase{
133-
ProviderFactories: testutils.ProviderFactories,
133+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
134134
Steps: []resource.TestStep{
135135
{
136136
Config: `resource "grafana_cloud_stack" "test" {

internal/resources/cloud/resource_synthetic_monitoring_installation_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ func TestAccSyntheticMonitoringInstallation(t *testing.T) {
2727
apiKeyName := apiKeyPrefix + acctest.RandStringFromCharSet(5, acctest.CharSetAlphaNum)
2828

2929
resource.ParallelTest(t, resource.TestCase{
30-
ProviderFactories: testutils.ProviderFactories,
31-
CheckDestroy: testAccStackCheckDestroy(&stack),
30+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
31+
CheckDestroy: testAccStackCheckDestroy(&stack),
3232
Steps: []resource.TestStep{
3333
{
3434
Config: testAccSyntheticMonitoringInstallation(stackSlug, apiKeyName, region),

internal/resources/examples_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func TestAccExamples(t *testing.T) {
120120
t.Run(filename, func(t *testing.T) {
121121
testDef.testCheck(t, filename)
122122
resource.Test(t, resource.TestCase{
123-
ProviderFactories: testutils.ProviderFactories,
123+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
124124
Steps: []resource.TestStep{{
125125
Config: testutils.TestAccExample(t, filename),
126126
}},

internal/resources/grafana/data_source_dashboard_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ func TestAccDatasourceDashboard_basic(t *testing.T) {
4242
}
4343

4444
resource.ParallelTest(t, resource.TestCase{
45-
ProviderFactories: testutils.ProviderFactories,
46-
CheckDestroy: dashboardCheckExists.destroyed(&dashboard, nil),
45+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
46+
CheckDestroy: dashboardCheckExists.destroyed(&dashboard, nil),
4747
Steps: []resource.TestStep{
4848
{
4949
Config: testutils.TestAccExample(t, "data-sources/grafana_dashboard/data-source.tf"),
@@ -58,7 +58,7 @@ func TestAccDatasourceDashboardBadExactlyOneOf(t *testing.T) {
5858

5959
// TODO: Make parallelizable
6060
resource.Test(t, resource.TestCase{
61-
ProviderFactories: testutils.ProviderFactories,
61+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
6262
Steps: []resource.TestStep{
6363
{
6464
Config: testutils.TestAccExample(t, "data-sources/grafana_dashboard/bad-ExactlyOneOf.tf"),

internal/resources/grafana/data_source_dashboards_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func TestAccDataSourceDashboardsAllAndByFolderID(t *testing.T) {
1212

1313
// Do not use parallel tests here because it tests a listing datasource on the default org
1414
resource.Test(t, resource.TestCase{
15-
ProviderFactories: testutils.ProviderFactories,
15+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
1616
Steps: []resource.TestStep{
1717
{
1818
Config: testutils.TestAccExample(t, "data-sources/grafana_dashboards/data-source.tf"),

internal/resources/grafana/data_source_data_source_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ func TestAccDatasourceDatasource_basic(t *testing.T) {
3232
}
3333

3434
resource.ParallelTest(t, resource.TestCase{
35-
ProviderFactories: testutils.ProviderFactories,
36-
CheckDestroy: datasourceCheckExists.destroyed(&dataSource, nil),
35+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
36+
CheckDestroy: datasourceCheckExists.destroyed(&dataSource, nil),
3737
Steps: []resource.TestStep{
3838
{
3939
Config: testutils.TestAccExample(t, "data-sources/grafana_data_source/data-source.tf"),

internal/resources/grafana/data_source_folder_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ func TestAccDatasourceFolder_basic(t *testing.T) {
2525
}
2626

2727
resource.ParallelTest(t, resource.TestCase{
28-
ProviderFactories: testutils.ProviderFactories,
29-
CheckDestroy: folderCheckExists.destroyed(&folder, nil),
28+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
29+
CheckDestroy: folderCheckExists.destroyed(&folder, nil),
3030
Steps: []resource.TestStep{
3131
{
3232
Config: testutils.TestAccExample(t, "data-sources/grafana_folder/data-source.tf"),
@@ -44,7 +44,7 @@ func TestAccDatasourceFolder_nested(t *testing.T) {
4444
randomName := acctest.RandStringFromCharSet(6, acctest.CharSetAlpha)
4545

4646
resource.ParallelTest(t, resource.TestCase{
47-
ProviderFactories: testutils.ProviderFactories,
47+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
4848
CheckDestroy: resource.ComposeTestCheckFunc(
4949
folderCheckExists.destroyed(&parent, nil),
5050
folderCheckExists.destroyed(&child, nil),

internal/resources/grafana/data_source_folders_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func TestAccDatasourceFolders_basic(t *testing.T) {
3838

3939
// TODO: Make parallelizable
4040
resource.Test(t, resource.TestCase{
41-
ProviderFactories: testutils.ProviderFactories,
41+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
4242
CheckDestroy: resource.ComposeTestCheckFunc(
4343
folderCheckExists.destroyed(&folderA, nil),
4444
folderCheckExists.destroyed(&folderB, nil),

internal/resources/grafana/data_source_library_panel_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ func TestAccDatasourceLibraryPanel_basic(t *testing.T) {
3232

3333
// TODO: Make parallelizable
3434
resource.Test(t, resource.TestCase{
35-
ProviderFactories: testutils.ProviderFactories,
36-
CheckDestroy: libraryPanelCheckExists.destroyed(&panel, nil),
35+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
36+
CheckDestroy: libraryPanelCheckExists.destroyed(&panel, nil),
3737
Steps: []resource.TestStep{
3838
{
3939
Config: testutils.TestAccExample(t, "data-sources/grafana_library_panel/data-source.tf"),

internal/resources/grafana/data_source_organization_preferences_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestAccDatasourceOrganizationPreferences_basic(t *testing.T) {
1616
}
1717

1818
resource.ParallelTest(t, resource.TestCase{
19-
ProviderFactories: testutils.ProviderFactories,
19+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
2020
Steps: []resource.TestStep{
2121
{
2222
Config: testutils.TestAccExample(t, "data-sources/grafana_organization_preferences/data-source.tf"),

internal/resources/grafana/data_source_organization_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ func TestAccDatasourceOrganization_basic(t *testing.T) {
3939
}
4040

4141
resource.ParallelTest(t, resource.TestCase{
42-
ProviderFactories: testutils.ProviderFactories,
43-
CheckDestroy: orgCheckExists.destroyed(&org, nil),
42+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
43+
CheckDestroy: orgCheckExists.destroyed(&org, nil),
4444
Steps: []resource.TestStep{
4545
{
4646
Config: testutils.TestAccExample(t, "data-sources/grafana_organization/data-source.tf"),

internal/resources/grafana/data_source_role_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ func TestAccDatasourceRole_basic(t *testing.T) {
2929
}
3030

3131
resource.ParallelTest(t, resource.TestCase{
32-
ProviderFactories: testutils.ProviderFactories,
33-
CheckDestroy: roleCheckExists.destroyed(&role, nil),
32+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
33+
CheckDestroy: roleCheckExists.destroyed(&role, nil),
3434
Steps: []resource.TestStep{
3535
{
3636
Config: testutils.TestAccExample(t, "data-sources/grafana_role/data-source.tf"),

internal/resources/grafana/data_source_service_account_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ func TestAccDataSourceServiceAccount_basic(t *testing.T) {
1818
name := acctest.RandString(10)
1919

2020
resource.ParallelTest(t, resource.TestCase{
21-
ProviderFactories: testutils.ProviderFactories,
22-
CheckDestroy: serviceAccountCheckExists.destroyed(&sa, nil),
21+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
22+
CheckDestroy: serviceAccountCheckExists.destroyed(&sa, nil),
2323
Steps: []resource.TestStep{
2424
{
2525
Config: testServiceAccountDatasourceConfig(name),

internal/resources/grafana/data_source_team_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ func TestAccDatasourceTeam_basic(t *testing.T) {
2424
}
2525

2626
resource.ParallelTest(t, resource.TestCase{
27-
ProviderFactories: testutils.ProviderFactories,
28-
CheckDestroy: teamCheckExists.destroyed(&team, nil),
27+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
28+
CheckDestroy: teamCheckExists.destroyed(&team, nil),
2929
Steps: []resource.TestStep{
3030
{
3131
Config: testutils.TestAccExample(t, "data-sources/grafana_team/data-source.tf"),
@@ -54,8 +54,8 @@ func TestAccDatasourceTeam_teamSync(t *testing.T) {
5454
}
5555

5656
resource.ParallelTest(t, resource.TestCase{
57-
ProviderFactories: testutils.ProviderFactories,
58-
CheckDestroy: teamCheckExists.destroyed(&team, nil),
57+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
58+
CheckDestroy: teamCheckExists.destroyed(&team, nil),
5959
Steps: []resource.TestStep{
6060
{
6161
Config: testutils.TestAccExample(t, "data-sources/grafana_team/with-team-sync.tf"),

internal/resources/grafana/data_source_user_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ func TestAccDatasourceUser_basic(t *testing.T) {
3737
}
3838

3939
resource.ParallelTest(t, resource.TestCase{
40-
ProviderFactories: testutils.ProviderFactories,
41-
CheckDestroy: userCheckExists.destroyed(&user, nil),
40+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
41+
CheckDestroy: userCheckExists.destroyed(&user, nil),
4242
Steps: []resource.TestStep{
4343
{
4444
Config: testutils.TestAccExample(t, "data-sources/grafana_user/data-source.tf"),

internal/resources/grafana/data_source_users_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func TestAccDatasourceUsers_basic(t *testing.T) {
2525
}
2626

2727
resource.ParallelTest(t, resource.TestCase{
28-
ProviderFactories: testutils.ProviderFactories,
28+
ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
2929
Steps: []resource.TestStep{
3030
{
3131
Config: testutils.TestAccExample(t, "data-sources/grafana_users/data-source.tf"),

internal/resources/grafana/resource_alerting_contact_point.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func resourceContactPoint() *schema.Resource {
4949
Description: `
5050
Manages Grafana Alerting contact points.
5151
52-
* [Official documentation](https://grafana.com/docs/grafana/next/alerting/fundamentals/contact-points/)
52+
* [Official documentation](https://grafana.com/docs/grafana/next/alerting/fundamentals/notifications/contact-points/)
5353
* [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/#contact-points)
5454
5555
This resource requires Grafana 9.1.0 or later.

0 commit comments

Comments
 (0)