@@ -73,7 +73,7 @@ func TestAccResourceMongoDBAtlasCustomDBRoles_WithInheritedRoles(t *testing.T) {
73
73
Actions : []matlas.Action {{
74
74
Action : "INSERT" ,
75
75
Resources : []matlas.Resource {{
76
- Db : fmt .Sprintf ("b_test-acc-ddb_name-%s" , acctest .RandString (5 )),
76
+ DB : pointy . String ( fmt .Sprintf ("b_test-acc-ddb_name-%s" , acctest .RandString (5 ) )),
77
77
}},
78
78
}},
79
79
},
@@ -93,7 +93,7 @@ func TestAccResourceMongoDBAtlasCustomDBRoles_WithInheritedRoles(t *testing.T) {
93
93
Actions : []matlas.Action {{
94
94
Action : "UPDATE" ,
95
95
Resources : []matlas.Resource {{
96
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
96
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
97
97
}},
98
98
}},
99
99
}
@@ -104,7 +104,7 @@ func TestAccResourceMongoDBAtlasCustomDBRoles_WithInheritedRoles(t *testing.T) {
104
104
Actions : []matlas.Action {{
105
105
Action : "FIND" ,
106
106
Resources : []matlas.Resource {{
107
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
107
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
108
108
}},
109
109
}},
110
110
},
@@ -124,7 +124,7 @@ func TestAccResourceMongoDBAtlasCustomDBRoles_WithInheritedRoles(t *testing.T) {
124
124
Actions : []matlas.Action {{
125
125
Action : "REMOVE" ,
126
126
Resources : []matlas.Resource {{
127
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
127
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
128
128
}},
129
129
}},
130
130
}
@@ -238,18 +238,18 @@ func TestAccResourceMongoDBAtlasCustomDBRoles_MultipleCustomRoles(t *testing.T)
238
238
Action : "REMOVE" ,
239
239
Resources : []matlas.Resource {
240
240
{
241
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
241
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
242
242
},
243
243
{
244
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
244
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
245
245
},
246
246
},
247
247
},
248
248
{
249
249
Action : "FIND" ,
250
250
Resources : []matlas.Resource {
251
251
{
252
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
252
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
253
253
},
254
254
},
255
255
},
@@ -263,18 +263,18 @@ func TestAccResourceMongoDBAtlasCustomDBRoles_MultipleCustomRoles(t *testing.T)
263
263
Action : "UPDATE" ,
264
264
Resources : []matlas.Resource {
265
265
{
266
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
266
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
267
267
},
268
268
{
269
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
269
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
270
270
},
271
271
},
272
272
},
273
273
{
274
274
Action : "INSERT" ,
275
275
Resources : []matlas.Resource {
276
276
{
277
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
277
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
278
278
},
279
279
},
280
280
},
@@ -294,29 +294,29 @@ func TestAccResourceMongoDBAtlasCustomDBRoles_MultipleCustomRoles(t *testing.T)
294
294
Action : "UPDATE" ,
295
295
Resources : []matlas.Resource {
296
296
{
297
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
297
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
298
298
},
299
299
},
300
300
},
301
301
{
302
302
Action : "FIND" ,
303
303
Resources : []matlas.Resource {
304
304
{
305
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
305
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
306
306
},
307
307
{
308
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
308
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
309
309
},
310
310
},
311
311
},
312
312
{
313
313
Action : "INSERT" ,
314
314
Resources : []matlas.Resource {
315
315
{
316
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
316
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
317
317
},
318
318
{
319
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
319
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
320
320
},
321
321
},
322
322
},
@@ -330,7 +330,7 @@ func TestAccResourceMongoDBAtlasCustomDBRoles_MultipleCustomRoles(t *testing.T)
330
330
Action : "REMOVE" ,
331
331
Resources : []matlas.Resource {
332
332
{
333
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
333
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
334
334
},
335
335
},
336
336
},
@@ -489,18 +489,18 @@ func TestAccResourceMongoDBAtlasCustomDBRoles_UpdatedInheritRoles(t *testing.T)
489
489
Action : "REMOVE" ,
490
490
Resources : []matlas.Resource {
491
491
{
492
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
492
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
493
493
},
494
494
{
495
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
495
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
496
496
},
497
497
},
498
498
},
499
499
{
500
500
Action : "FIND" ,
501
501
Resources : []matlas.Resource {
502
502
{
503
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
503
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
504
504
},
505
505
},
506
506
},
@@ -514,29 +514,29 @@ func TestAccResourceMongoDBAtlasCustomDBRoles_UpdatedInheritRoles(t *testing.T)
514
514
Action : "UPDATE" ,
515
515
Resources : []matlas.Resource {
516
516
{
517
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
517
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
518
518
},
519
519
},
520
520
},
521
521
{
522
522
Action : "FIND" ,
523
523
Resources : []matlas.Resource {
524
524
{
525
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
525
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
526
526
},
527
527
{
528
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
528
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
529
529
},
530
530
},
531
531
},
532
532
{
533
533
Action : "INSERT" ,
534
534
Resources : []matlas.Resource {
535
535
{
536
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
536
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
537
537
},
538
538
{
539
- Db : fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 )),
539
+ DB : pointy . String ( fmt .Sprintf ("test-acc-db_name-%s" , acctest .RandString (5 ) )),
540
540
},
541
541
},
542
542
},
@@ -735,9 +735,9 @@ func testAccMongoDBAtlasCustomDBRolesConfigWithInheritedRoles(projectID string,
735
735
}
736
736
}
737
737
` , projectID ,
738
- inheritedRole [0 ].RoleName , inheritedRole [0 ].Actions [0 ].Action , inheritedRole [0 ].Actions [0 ].Resources [0 ].Db ,
738
+ inheritedRole [0 ].RoleName , inheritedRole [0 ].Actions [0 ].Action , * inheritedRole [0 ].Actions [0 ].Resources [0 ].DB ,
739
739
inheritedRole [1 ].RoleName , inheritedRole [1 ].Actions [0 ].Action , * inheritedRole [1 ].Actions [0 ].Resources [0 ].Cluster ,
740
- testRole .RoleName , testRole .Actions [0 ].Action , testRole .Actions [0 ].Resources [0 ].Db ,
740
+ testRole .RoleName , testRole .Actions [0 ].Action , * testRole .Actions [0 ].Resources [0 ].DB ,
741
741
)
742
742
}
743
743
@@ -758,7 +758,7 @@ func testAccMongoDBAtlasCustomDBRolesConfigMultiple(projectID string, inheritedR
758
758
collection_name = ""
759
759
database_name = "%s"
760
760
}
761
- ` , r . Db )
761
+ ` , * r . DB )
762
762
}
763
763
764
764
// get the actions and set the resources
0 commit comments