3737
3838 RecoveryProtectedDatabaseDataSourceRepresentation = map [string ]interface {}{
3939 "compartment_id" : acctest.Representation {RepType : acctest .Required , Create : `${var.compartment_id}` },
40+ "backup_cloud_location" : acctest.Representation {RepType : acctest .Optional , Create : `OCI` },
4041 "display_name" : acctest.Representation {RepType : acctest .Optional , Create : `displayName` , Update : `displayName2` },
4142 "id" : acctest.Representation {RepType : acctest .Optional , Create : `${oci_recovery_protected_database.test_protected_database.id}` },
4243 "protection_policy_id" : acctest.Representation {RepType : acctest .Optional , Create : `${data.oci_recovery_protection_policy.test_protection_policy.id}` },
@@ -61,12 +62,12 @@ var (
6162 "deletion_schedule" : acctest.Representation {RepType : acctest .Optional , Create : `DELETE_AFTER_72_HOURS` },
6263 "freeform_tags" : acctest.Representation {RepType : acctest .Optional , Create : map [string ]string {"bar-key" : "value" }, Update : map [string ]string {"Department" : "Accounting" }},
6364 "is_redo_logs_shipped" : acctest.Representation {RepType : acctest .Optional , Create : `false` , Update : `true` },
64- "subscription_id" : acctest.Representation {RepType : acctest .Optional , Create : `ocid1.organizationssubscription.oc1..amaaaaaa6jqx4paaa2rxk42owtrtvwkhauvoqb2equbymlvdrlv5tclvvvta` , Update : `ocid1.organizationssubscription.oc1..amaaaaaa6jqx4paaa2rxk42owtrtvwkhauvoqb2equbymlvdrlv5tclvvita` },
6565 "lifecycle" : acctest.RepresentationGroup {RepType : acctest .Required , Group : recoveryIgnoreDefinedTagsRepresentation },
6666 }
6767 RecoveryProtectedDatabaseRecoveryServiceSubnetsRepresentation = map [string ]interface {}{
6868 "recovery_service_subnet_id" : acctest.Representation {RepType : acctest .Required , Create : `${data.oci_recovery_recovery_service_subnet.test_recovery_service_subnet.id}` },
6969 }
70+
7071 RecoveryProtectedDatabaseResourceDependencies = acctest .GenerateResourceFromRepresentationMap ("oci_core_subnet" , "test_subnet" , acctest .Required , acctest .Create , CoreSubnetRepresentation ) +
7172 acctest .GenerateResourceFromRepresentationMap ("oci_core_vcn" , "test_vcn" , acctest .Required , acctest .Create , CoreVcnRepresentation ) +
7273 acctest .GenerateResourceFromRepresentationMap ("oci_recovery_protection_policy" , "test_protection_policy" , acctest .Required , acctest .Create , RecoveryProtectionPolicyRepresentation ) +
@@ -164,7 +165,6 @@ func TestRecoveryProtectedDatabaseResource_basic(t *testing.T) {
164165 resource .TestCheckResourceAttrSet (resourceName , "protection_policy_id" ),
165166 resource .TestCheckResourceAttr (resourceName , "recovery_service_subnets.#" , "1" ),
166167 resource .TestCheckResourceAttrSet (resourceName , "recovery_service_subnets.0.recovery_service_subnet_id" ),
167- resource .TestCheckResourceAttrSet (resourceName , "subscription_id" ),
168168 resource .TestCheckResourceAttrSet (resourceName , "vpc_user_name" ),
169169
170170 func (s * terraform.State ) (err error ) {
@@ -200,7 +200,6 @@ func TestRecoveryProtectedDatabaseResource_basic(t *testing.T) {
200200 resource .TestCheckResourceAttrSet (resourceName , "protection_policy_id" ),
201201 resource .TestCheckResourceAttr (resourceName , "recovery_service_subnets.#" , "1" ),
202202 resource .TestCheckResourceAttrSet (resourceName , "recovery_service_subnets.0.recovery_service_subnet_id" ),
203- resource .TestCheckResourceAttrSet (resourceName , "subscription_id" ),
204203 resource .TestCheckResourceAttrSet (resourceName , "vpc_user_name" ),
205204
206205 func (s * terraform.State ) (err error ) {
@@ -231,7 +230,6 @@ func TestRecoveryProtectedDatabaseResource_basic(t *testing.T) {
231230 resource .TestCheckResourceAttrSet (resourceName , "protection_policy_id" ),
232231 resource .TestCheckResourceAttr (resourceName , "recovery_service_subnets.#" , "1" ),
233232 resource .TestCheckResourceAttrSet (resourceName , "recovery_service_subnets.0.recovery_service_subnet_id" ),
234- resource .TestCheckResourceAttrSet (resourceName , "subscription_id" ),
235233 resource .TestCheckResourceAttrSet (resourceName , "vpc_user_name" ),
236234
237235 func (s * terraform.State ) (err error ) {
@@ -250,6 +248,7 @@ func TestRecoveryProtectedDatabaseResource_basic(t *testing.T) {
250248 compartmentIdVariableStr + RecoveryProtectedDatabaseResourceStaticDependencies +
251249 acctest .GenerateResourceFromRepresentationMap ("oci_recovery_protected_database" , "test_protected_database" , acctest .Optional , acctest .Update , RecoveryProtectedDatabaseRepresentation ),
252250 Check : acctest .ComposeAggregateTestCheckFuncWrapper (
251+ resource .TestCheckResourceAttr (datasourceName , "backup_cloud_location" , "OCI" ),
253252 resource .TestCheckResourceAttr (datasourceName , "compartment_id" , compartmentId ),
254253 resource .TestCheckResourceAttr (datasourceName , "display_name" , "displayName2" ),
255254 resource .TestCheckResourceAttrSet (datasourceName , "id" ),
@@ -269,6 +268,7 @@ func TestRecoveryProtectedDatabaseResource_basic(t *testing.T) {
269268 Check : acctest .ComposeAggregateTestCheckFuncWrapper (
270269 resource .TestCheckResourceAttrSet (singularDatasourceName , "protected_database_id" ),
271270
271+ resource .TestCheckResourceAttrSet (singularDatasourceName , "backup_cloud_location" ),
272272 resource .TestCheckResourceAttr (singularDatasourceName , "compartment_id" , compartmentId ),
273273 resource .TestCheckResourceAttr (singularDatasourceName , "database_size" , "S" ),
274274 resource .TestCheckResourceAttr (singularDatasourceName , "db_unique_name" , "dbUniqueName" ),
0 commit comments