@@ -99,6 +99,8 @@ func TestAccScalewayRdbInstance_WithCluster(t *testing.T) {
99
99
engine = "PostgreSQL-11"
100
100
is_ha_cluster = true
101
101
disable_backup = false
102
+ backup_schedule_frequency = 24
103
+ backup_schedule_retention = 7
102
104
user_name = "my_initial_user"
103
105
password = "thiZ_is_v&ry_s8cret"
104
106
tags = [ "terraform-test", "scaleway_rdb_instance", "minimal" ]
@@ -119,6 +121,8 @@ func TestAccScalewayRdbInstance_WithCluster(t *testing.T) {
119
121
resource .TestCheckResourceAttr ("scaleway_rdb_instance.rdbWithCluster" , "engine" , "PostgreSQL-11" ),
120
122
resource .TestCheckResourceAttr ("scaleway_rdb_instance.rdbWithCluster" , "is_ha_cluster" , "true" ),
121
123
resource .TestCheckResourceAttr ("scaleway_rdb_instance.rdbWithCluster" , "disable_backup" , "false" ),
124
+ resource .TestCheckResourceAttr ("scaleway_rdb_instance.rdbWithCluster" , "backup_schedule_frequency" , "24" ),
125
+ resource .TestCheckResourceAttr ("scaleway_rdb_instance.rdbWithCluster" , "backup_schedule_retention" , "7" ),
122
126
resource .TestCheckResourceAttr ("scaleway_rdb_instance.rdbWithCluster" , "user_name" , "my_initial_user" ),
123
127
resource .TestCheckResourceAttr ("scaleway_rdb_instance.rdbWithCluster" , "password" , "thiZ_is_v&ry_s8cret" ),
124
128
resource .TestCheckResourceAttr ("scaleway_rdb_instance.rdbWithCluster" , "tags.0" , "terraform-test" ),
@@ -254,41 +258,6 @@ func TestAccScalewayRdbInstance_Volume(t *testing.T) {
254
258
})
255
259
}
256
260
257
- func TestAccScalewayRdbInstance_BackupSchedule (t * testing.T ) {
258
- tt := NewTestTools (t )
259
- defer tt .Cleanup ()
260
- resource .ParallelTest (t , resource.TestCase {
261
- PreCheck : func () { testAccPreCheck (t ) },
262
- ProviderFactories : tt .ProviderFactories ,
263
- CheckDestroy : testAccCheckScalewayRdbInstanceDestroy (tt ),
264
- Steps : []resource.TestStep {
265
- {
266
- Config : `
267
- resource scaleway_rdb_instance rdbSchedule {
268
- name = "test-rdb-schedule"
269
- node_type = "db-dev-s"
270
- engine = "PostgreSQL-11"
271
- is_ha_cluster = false
272
- disable_backup = false
273
- backup_schedule_frequency = 24
274
- backup_schedule_retention = 7
275
- user_name = "my_initial_user"
276
- password = "thiZ_is_v&ry_s3cret"
277
- region = "nl-ams"
278
- tags = [ "terraform-test", "scaleway_rdb_instance", "volume" ]
279
- }
280
- ` ,
281
- Check : resource .ComposeTestCheckFunc (
282
- testAccCheckScalewayRdbExists (tt , "scaleway_rdb_instance.rdbSchedule" ),
283
- resource .TestCheckResourceAttr ("scaleway_rdb_instance.rdbSchedule" , "disable_backup" , "false" ),
284
- resource .TestCheckResourceAttr ("scaleway_rdb_instance.rdbSchedule" , "backup_schedule_frequency" , "24" ),
285
- resource .TestCheckResourceAttr ("scaleway_rdb_instance.rdbSchedule" , "backup_schedule_retention" , "7" ),
286
- ),
287
- },
288
- },
289
- })
290
- }
291
-
292
261
func testAccCheckScalewayRdbExists (tt * TestTools , n string ) resource.TestCheckFunc {
293
262
return func (s * terraform.State ) error {
294
263
rs , ok := s .RootModule ().Resources [n ]
0 commit comments