@@ -47,20 +47,21 @@ var (
4747 "compartment_id" : Representation {repType : Required , create : `${var.compartment_id}` },
4848 "idcs_access_token" : Representation {repType : Required , create : `${var.idcs_access_token}` },
4949 "name" : Representation {repType : Required , create : instanceName },
50- "object_storage_namespace" : Representation {repType : Required , create : `${data.oci_identity_tenancy.test_tenancy.name }` },
50+ "object_storage_namespace" : Representation {repType : Required , create : `${data.oci_objectstorage_namespace.test_namespace.namespace }` },
5151 "tenancy_id" : Representation {repType : Required , create : `${data.oci_identity_tenancy.test_tenancy.id}` },
5252 "tenancy_name" : Representation {repType : Required , create : `${data.oci_identity_tenancy.test_tenancy.name}` },
5353 "defined_tags" : Representation {repType : 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")}` },
5454 "description" : Representation {repType : Optional , create : `description` , update : `description2` },
5555 "freeform_tags" : Representation {repType : Optional , create : map [string ]string {"bar-key" : "value" }, update : map [string ]string {"Department" : "Accounting" }},
5656 "instance_access_type" : Representation {repType : Optional , create : `PUBLIC` },
5757 "instance_license_type" : Representation {repType : Optional , create : `NEW` , update : `BYOL` },
58- "instance_usage_type" : Representation {repType : Optional , create : `NONPRIMARY` },
58+ "instance_usage_type" : Representation {repType : Optional , create : `NONPRIMARY` , update : `PRIMARY` },
5959 "upgrade_schedule" : Representation {repType : Optional , create : `UPGRADE_IMMEDIATELY` },
6060 "waf_primary_domain" : Representation {repType : Optional , create : `oracle.com` , update : `java.com` },
6161 }
6262
6363 OceInstanceResourceDependencies = generateDataSourceFromRepresentationMap ("oci_identity_tenancy" , "test_tenancy" , Required , Create , tenancySingularDataSourceRepresentation ) +
64+ generateDataSourceFromRepresentationMap ("oci_objectstorage_namespace" , "test_namespace" , Optional , Create , namespaceSingularDataSourceRepresentation ) +
6465 DefinedTagsDependencies
6566)
6667
@@ -216,7 +217,7 @@ func TestOceOceInstanceResource_basic(t *testing.T) {
216217 resource .TestCheckResourceAttrSet (resourceName , "idcs_tenancy" ),
217218 resource .TestCheckResourceAttr (resourceName , "instance_access_type" , "PUBLIC" ),
218219 resource .TestCheckResourceAttr (resourceName , "instance_license_type" , "BYOL" ),
219- resource .TestCheckResourceAttr (resourceName , "instance_usage_type" , "NONPRIMARY " ),
220+ resource .TestCheckResourceAttr (resourceName , "instance_usage_type" , "PRIMARY " ),
220221 resource .TestCheckResourceAttr (resourceName , "name" , instanceName ),
221222 resource .TestCheckResourceAttrSet (resourceName , "object_storage_namespace" ),
222223 resource .TestCheckResourceAttrSet (resourceName , "tenancy_id" ),
@@ -255,7 +256,7 @@ func TestOceOceInstanceResource_basic(t *testing.T) {
255256 resource .TestCheckResourceAttrSet (datasourceName , "oce_instances.0.idcs_tenancy" ),
256257 resource .TestCheckResourceAttr (datasourceName , "oce_instances.0.instance_access_type" , "PUBLIC" ),
257258 resource .TestCheckResourceAttr (datasourceName , "oce_instances.0.instance_license_type" , "BYOL" ),
258- resource .TestCheckResourceAttr (datasourceName , "oce_instances.0.instance_usage_type" , "NONPRIMARY " ),
259+ resource .TestCheckResourceAttr (datasourceName , "oce_instances.0.instance_usage_type" , "PRIMARY " ),
259260 resource .TestCheckResourceAttr (datasourceName , "oce_instances.0.name" , instanceName ),
260261 resource .TestCheckResourceAttrSet (datasourceName , "oce_instances.0.object_storage_namespace" ),
261262 resource .TestCheckResourceAttrSet (datasourceName , "oce_instances.0.state" ),
@@ -286,7 +287,7 @@ func TestOceOceInstanceResource_basic(t *testing.T) {
286287 resource .TestCheckResourceAttrSet (singularDatasourceName , "idcs_tenancy" ),
287288 resource .TestCheckResourceAttr (singularDatasourceName , "instance_access_type" , "PUBLIC" ),
288289 resource .TestCheckResourceAttr (singularDatasourceName , "instance_license_type" , "BYOL" ),
289- resource .TestCheckResourceAttr (singularDatasourceName , "instance_usage_type" , "NONPRIMARY " ),
290+ resource .TestCheckResourceAttr (singularDatasourceName , "instance_usage_type" , "PRIMARY " ),
290291 resource .TestCheckResourceAttr (singularDatasourceName , "name" , instanceName ),
291292 resource .TestCheckResourceAttrSet (singularDatasourceName , "object_storage_namespace" ),
292293 resource .TestCheckResourceAttrSet (singularDatasourceName , "state" ),
0 commit comments