@@ -84,18 +84,28 @@ var (
8484 "defined_tags" : acctest.Representation {RepType : acctest .Optional , Create : `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}` , Update : `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}` },
8585 "freeform_tags" : acctest.Representation {RepType : acctest .Optional , Create : map [string ]string {"Department" : "Finance" }, Update : map [string ]string {"Department" : "Accounting" }},
8686 "is_enabled" : acctest.Representation {RepType : acctest .Optional , Create : `false` , Update : `true` },
87+ "pitr_policy" : acctest.RepresentationGroup {RepType : acctest .Optional , Group : mysqlDbSystemBackupPolicyPitrPolicyRepresentation },
8788 "retention_in_days" : acctest.Representation {RepType : acctest .Optional , Create : `10` , Update : `11` },
8889 "window_start_time" : acctest.Representation {RepType : acctest .Optional , Create : `01:00-00:00` , Update : `02:00-00:00` },
8990 }
9091
92+ mysqlDbSystemBackupPolicyPitrPolicyRepresentation = map [string ]interface {}{
93+ "is_enabled" : acctest.Representation {RepType : acctest .Optional , Create : `false` , Update : `true` },
94+ }
95+
9196 MysqlDbSystemBackupPolicyNotUpdateableRepresentation = map [string ]interface {}{
9297 "defined_tags" : acctest.Representation {RepType : acctest .Optional , Create : `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}` },
9398 "freeform_tags" : acctest.Representation {RepType : acctest .Optional , Create : map [string ]string {"Department" : "Finance" }},
9499 "is_enabled" : acctest.Representation {RepType : acctest .Optional , Create : `false` },
100+ "pitr_policy" : acctest.RepresentationGroup {RepType : acctest .Optional , Group : mysqlDbSystemBackupPolicyPitrPolicyNotUpdateableRepresentation },
95101 "retention_in_days" : acctest.Representation {RepType : acctest .Optional , Create : `10` },
96102 "window_start_time" : acctest.Representation {RepType : acctest .Optional , Create : `01:00-00:00` },
97103 }
98104
105+ mysqlDbSystemBackupPolicyPitrPolicyNotUpdateableRepresentation = map [string ]interface {}{
106+ "is_enabled" : acctest.Representation {RepType : acctest .Optional , Create : `false` },
107+ }
108+
99109 mysqlDbSystemDeletionPolicyRepresentation = map [string ]interface {}{
100110 // Don't update these as setting the deletion policy to true or backup retention to retain will leave resources
101111 // that can't be removed.
@@ -173,6 +183,8 @@ func TestMysqlMysqlDbSystemResource_basic(t *testing.T) {
173183 resource .TestCheckResourceAttr (resourceName , "backup_policy.#" , "1" ),
174184 resource .TestCheckResourceAttr (resourceName , "backup_policy.0.freeform_tags.%" , "1" ),
175185 resource .TestCheckResourceAttr (resourceName , "backup_policy.0.is_enabled" , "false" ),
186+ resource .TestCheckResourceAttr (resourceName , "backup_policy.0.pitr_policy.#" , "1" ),
187+ resource .TestCheckResourceAttr (resourceName , "backup_policy.0.pitr_policy.0.is_enabled" , "false" ),
176188 resource .TestCheckResourceAttr (resourceName , "backup_policy.0.retention_in_days" , "10" ),
177189 resource .TestCheckResourceAttr (resourceName , "backup_policy.0.window_start_time" , "01:00-00:00" ),
178190 resource .TestCheckResourceAttr (resourceName , "compartment_id" , compartmentId ),
@@ -227,6 +239,8 @@ func TestMysqlMysqlDbSystemResource_basic(t *testing.T) {
227239 resource .TestCheckResourceAttr (resourceName , "backup_policy.#" , "1" ),
228240 resource .TestCheckResourceAttr (resourceName , "backup_policy.0.freeform_tags.%" , "1" ),
229241 resource .TestCheckResourceAttr (resourceName , "backup_policy.0.is_enabled" , "true" ),
242+ resource .TestCheckResourceAttr (resourceName , "backup_policy.0.pitr_policy.#" , "1" ),
243+ resource .TestCheckResourceAttr (resourceName , "backup_policy.0.pitr_policy.0.is_enabled" , "true" ),
230244 resource .TestCheckResourceAttr (resourceName , "backup_policy.0.retention_in_days" , "11" ),
231245 resource .TestCheckResourceAttr (resourceName , "backup_policy.0.window_start_time" , "02:00-00:00" ),
232246 resource .TestCheckResourceAttr (resourceName , "compartment_id" , compartmentId ),
@@ -329,6 +343,8 @@ func TestMysqlMysqlDbSystemResource_basic(t *testing.T) {
329343 resource .TestCheckResourceAttr (singularDatasourceName , "backup_policy.#" , "1" ),
330344 resource .TestCheckResourceAttr (singularDatasourceName , "backup_policy.0.freeform_tags.%" , "1" ),
331345 resource .TestCheckResourceAttr (singularDatasourceName , "backup_policy.0.is_enabled" , "true" ),
346+ resource .TestCheckResourceAttr (singularDatasourceName , "backup_policy.0.pitr_policy.#" , "1" ),
347+ resource .TestCheckResourceAttr (singularDatasourceName , "backup_policy.0.pitr_policy.0.is_enabled" , "true" ),
332348 resource .TestCheckResourceAttr (singularDatasourceName , "backup_policy.0.retention_in_days" , "11" ),
333349 resource .TestCheckResourceAttr (singularDatasourceName , "backup_policy.0.window_start_time" , "02:00-00:00" ),
334350 resource .TestCheckResourceAttr (singularDatasourceName , "channels.#" , "1" ),
@@ -354,6 +370,7 @@ func TestMysqlMysqlDbSystemResource_basic(t *testing.T) {
354370 resource .TestCheckResourceAttr (singularDatasourceName , "is_highly_available" , "false" ),
355371 resource .TestCheckResourceAttr (singularDatasourceName , "maintenance.#" , "1" ),
356372 resource .TestCheckResourceAttr (singularDatasourceName , "maintenance.0.window_start_time" , "sun 01:00" ),
373+ resource .TestCheckResourceAttrSet (singularDatasourceName , "mysql_version" ),
357374 resource .TestCheckResourceAttr (singularDatasourceName , "port" , "3306" ),
358375 resource .TestCheckResourceAttr (singularDatasourceName , "port_x" , "33306" ),
359376 resource .TestCheckResourceAttr (singularDatasourceName , "source.#" , "1" ),
0 commit comments