Skip to content

Commit c71982d

Browse files
Playlists: Move examples of deprecated dashboard_by_id to dashboard_by_uid (#1927)
1 parent a2ff67e commit c71982d

File tree

3 files changed

+25
-25
lines changed

3 files changed

+25
-25
lines changed

docs/resources/playlist.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ resource "grafana_playlist" "test" {
2929
3030
item {
3131
order = 1
32-
title = "Terraform Dashboard By ID"
33-
type = "dashboard_by_id"
34-
value = "3"
32+
title = "Terraform Dashboard By UID"
33+
type = "dashboard_by_uid"
34+
value = "cIBgcSjkk"
3535
}
3636
}
3737
```

examples/resources/grafana_playlist/resource.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ resource "grafana_playlist" "test" {
1313

1414
item {
1515
order = 1
16-
title = "Terraform Dashboard By ID"
17-
type = "dashboard_by_id"
18-
value = "3"
16+
title = "Terraform Dashboard By UID"
17+
type = "dashboard_by_uid"
18+
value = "cIBgcSjkk"
1919
}
2020
}

internal/resources/grafana/resource_playlist_test.go

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func TestAccPlaylist_basic(t *testing.T) {
3737
}),
3838
resource.TestCheckTypeSetElemNestedAttrs(paylistResource, "item.*", map[string]string{
3939
"order": "2",
40-
"title": "Terraform Dashboard By ID",
40+
"title": "Terraform Dashboard By UID",
4141
}),
4242
testutils.CheckLister(paylistResource),
4343
),
@@ -85,15 +85,15 @@ func TestAccPlaylist_update(t *testing.T) {
8585
resource.TestCheckResourceAttr(paylistResource, "item.#", "2"),
8686
resource.TestCheckTypeSetElemNestedAttrs(paylistResource, "item.*", map[string]string{
8787
"order": "1",
88-
"title": "Terraform Dashboard By ID",
89-
"type": "dashboard_by_id",
90-
"value": "3",
88+
"title": "Terraform Dashboard By UID",
89+
"type": "dashboard_by_uid",
90+
"value": "uid-3",
9191
}),
9292
resource.TestCheckTypeSetElemNestedAttrs(paylistResource, "item.*", map[string]string{
9393
"order": "2",
9494
"title": "other",
95-
"type": "dashboard_by_id",
96-
"value": "1",
95+
"type": "dashboard_by_uid",
96+
"value": "uid-1",
9797
}),
9898
),
9999
},
@@ -106,15 +106,15 @@ func TestAccPlaylist_update(t *testing.T) {
106106
resource.TestCheckResourceAttr(paylistResource, "item.#", "2"),
107107
resource.TestCheckTypeSetElemNestedAttrs(paylistResource, "item.*", map[string]string{
108108
"order": "1",
109-
"title": "Terraform Dashboard By ID",
110-
"type": "dashboard_by_id",
111-
"value": "4",
109+
"title": "Terraform Dashboard By UID",
110+
"type": "dashboard_by_uid",
111+
"value": "uid-4",
112112
}),
113113
resource.TestCheckTypeSetElemNestedAttrs(paylistResource, "item.*", map[string]string{
114114
"order": "2",
115115
"title": "other",
116-
"type": "dashboard_by_id",
117-
"value": "1",
116+
"type": "dashboard_by_uid",
117+
"value": "uid-1",
118118
}),
119119
),
120120
},
@@ -177,7 +177,7 @@ func TestAccPlaylist_inOrg(t *testing.T) {
177177
}),
178178
resource.TestCheckTypeSetElemNestedAttrs(paylistResource, "item.*", map[string]string{
179179
"order": "2",
180-
"title": "Terraform Dashboard By ID",
180+
"title": "Terraform Dashboard By UID",
181181
}),
182182
),
183183
},
@@ -215,7 +215,7 @@ resource "grafana_playlist" "test" {
215215
216216
item {
217217
order = 2
218-
title = "Terraform Dashboard By ID"
218+
title = "Terraform Dashboard By UID"
219219
}
220220
221221
item {
@@ -240,7 +240,7 @@ resource "grafana_playlist" "test" {
240240
241241
item {
242242
order = 2
243-
title = "Terraform Dashboard By ID"
243+
title = "Terraform Dashboard By UID"
244244
}
245245
246246
item {
@@ -261,15 +261,15 @@ resource "grafana_playlist" "test" {
261261
item {
262262
order = 2
263263
title = "other"
264-
type = "dashboard_by_id"
265-
value = "1"
264+
type = "dashboard_by_uid"
265+
value = "uid-1"
266266
}
267267
268268
item {
269269
order = 1
270-
title = "Terraform Dashboard By ID"
271-
type = "dashboard_by_id"
272-
value = "%[2]s"
270+
title = "Terraform Dashboard By UID"
271+
type = "dashboard_by_uid"
272+
value = "uid-%[2]s"
273273
}
274274
}
275275
`, name, value)

0 commit comments

Comments
 (0)