4040 "monitored_resource_id" : acctest.Representation {RepType : acctest .Required , Create : `${oci_stack_monitoring_monitored_resource.test_monitored_resource.id}` },
4141 }
4242
43+ StackMonitoringMonitoredResourceOSCreateProperty1 = map [string ]interface {}{
44+ "name" : acctest.Representation {RepType : acctest .Required , Create : `osName` },
45+ "value" : acctest.Representation {RepType : acctest .Required , Create : `Linux` },
46+ }
47+
48+ StackMonitoringMonitoredResourceOSCreateProperty2 = map [string ]interface {}{
49+ "name" : acctest.Representation {RepType : acctest .Required , Create : `osVersion` },
50+ "value" : acctest.Representation {RepType : acctest .Required , Create : `7.0` },
51+ }
52+
53+ StackMonitoringMonitoredResourceOSUpdateProperty1 = map [string ]interface {}{
54+ "name" : acctest.Representation {RepType : acctest .Required , Update : `osName` },
55+ "value" : acctest.Representation {RepType : acctest .Required , Update : `Linux` },
56+ }
57+
58+ StackMonitoringMonitoredResourceOSUpdateProperty2 = map [string ]interface {}{
59+ "name" : acctest.Representation {RepType : acctest .Required , Update : `osVersion` },
60+ "value" : acctest.Representation {RepType : acctest .Required , Update : `7.0` },
61+ }
62+
4363 StackMonitoringMonitoredResourceRepresentation = map [string ]interface {}{
4464 "compartment_id" : acctest.Representation {RepType : acctest .Required , Create : `${var.compartment_id}` },
4565 "name" : acctest.Representation {RepType : acctest .Required , Create : `terraformResource` },
@@ -49,13 +69,13 @@ var (
4969 "management_agent_id" : acctest.Representation {RepType : acctest .Optional , Create : `${var.stack_mon_management_agent_id_resource1}` },
5070 "credentials" : acctest.RepresentationGroup {RepType : acctest .Optional , Group : StackMonitoringMonitoredResourceCredentialsRepresentation },
5171 "database_connection_details" : acctest.RepresentationGroup {RepType : acctest .Optional , Group : StackMonitoringMonitoredResourceDatabaseConnectionDetailsRepresentation },
52- "properties" : acctest.RepresentationGroup {RepType : acctest .Optional , Group : StackMonitoringMonitoredResourcePropertiesRepresentation },
72+ "properties" : [] acctest.RepresentationGroup {{ RepType : acctest .Optional , Group : StackMonitoringMonitoredResourceOSCreateProperty1 }, { RepType : acctest . Optional , Group : StackMonitoringMonitoredResourceOSCreateProperty2 } },
5373 "resource_time_zone" : acctest.Representation {RepType : acctest .Optional , Create : `en` },
5474 "lifecycle" : acctest.RepresentationGroup {RepType : acctest .Required , Group : ignoreSensitiveDataRepresentation },
5575 }
5676 //Get API does not return sensitive data, it returns null
5777 ignoreSensitiveDataRepresentation = map [string ]interface {}{
58- "ignore_changes" : acctest.Representation {RepType : acctest .Required , Create : []string {`credentials` , `database_connection_details` }},
78+ "ignore_changes" : acctest.Representation {RepType : acctest .Required , Create : []string {`credentials` , `database_connection_details` , `properties` , `external_id` }},
5979 }
6080
6181 StackMonitoredResourceRepresentation2 = map [string ]interface {}{
6585 "display_name" : acctest.Representation {RepType : acctest .Optional , Create : `displaySecondaryNameTerra` , Update : `displaySecondaryNameTerra2` },
6686 "host_name" : acctest.Representation {RepType : acctest .Optional , Create : `${var.stack_mon_hostname_resource2}` },
6787 "management_agent_id" : acctest.Representation {RepType : acctest .Optional , Create : `${var.stack_mon_management_agent_id_resource2}` },
68- "properties" : acctest.RepresentationGroup {RepType : acctest .Optional , Group : StackMonitoringMonitoredResourcePropertiesRepresentation },
88+ "properties" : [] acctest.RepresentationGroup {{ RepType : acctest .Optional , Group : StackMonitoringMonitoredResourceOSCreateProperty1 }, { RepType : acctest . Optional , Group : StackMonitoringMonitoredResourceOSCreateProperty2 } },
6989 "resource_time_zone" : acctest.Representation {RepType : acctest .Optional , Create : `en` },
7090 }
7191
@@ -90,10 +110,7 @@ var (
90110 "connector_id" : acctest.Representation {RepType : acctest .Optional , Create : `connector.id` },
91111 "db_id" : acctest.Representation {RepType : acctest .Optional , Create : `db_id` },
92112 "db_unique_name" : acctest.Representation {RepType : acctest .Optional , Create : `dbUniqueName` , Update : `dbUniqueName2` },
93- }
94- StackMonitoringMonitoredResourcePropertiesRepresentation = map [string ]interface {}{
95- "name" : acctest.Representation {RepType : acctest .Optional , Create : `OS` , Update : `OS` },
96- "value" : acctest.Representation {RepType : acctest .Optional , Create : `Linux` , Update : `Linux` },
113+ "ssl_secret_id" : acctest.Representation {RepType : acctest .Optional , Create : `ssl_secret_id` },
97114 }
98115 StackMonitoringMonitoredResourceAliasesCredentialRepresentation = map [string ]interface {}{
99116 "name" : acctest.Representation {RepType : acctest .Required , Create : `name` , Update : `name2` },
@@ -174,9 +191,7 @@ func TestStackMonitoringMonitoredResourceResource_basic(t *testing.T) {
174191 resource .TestCheckResourceAttrSet (resourceName , "id" ),
175192 resource .TestCheckResourceAttrSet (resourceName , "management_agent_id" ),
176193 resource .TestCheckResourceAttr (resourceName , "name" , "terraformResource" ),
177- resource .TestCheckResourceAttr (resourceName , "properties.#" , "1" ),
178- resource .TestCheckResourceAttr (resourceName , "properties.0.name" , "OS" ),
179- resource .TestCheckResourceAttr (resourceName , "properties.0.value" , "Linux" ),
194+ resource .TestCheckResourceAttr (resourceName , "properties.#" , "4" ),
180195 resource .TestCheckResourceAttr (resourceName , "resource_time_zone" , "en" ),
181196 resource .TestCheckResourceAttr (resourceName , "type" , "host" ),
182197
@@ -205,9 +220,7 @@ func TestStackMonitoringMonitoredResourceResource_basic(t *testing.T) {
205220 resource .TestCheckResourceAttrSet (resourceName , "host_name" ),
206221 resource .TestCheckResourceAttrSet (resourceName , "id" ),
207222 resource .TestCheckResourceAttrSet (resourceName , "management_agent_id" ),
208- resource .TestCheckResourceAttr (resourceName , "properties.#" , "1" ),
209- resource .TestCheckResourceAttr (resourceName , "properties.0.name" , "OS" ),
210- resource .TestCheckResourceAttr (resourceName , "properties.0.value" , "Linux" ),
223+ resource .TestCheckResourceAttr (resourceName , "properties.#" , "4" ),
211224 resource .TestCheckResourceAttr (resourceName , "resource_time_zone" , "en" ),
212225 resource .TestCheckResourceAttrSet (resourceName , "tenant_id" ),
213226 resource .TestCheckResourceAttr (resourceName , "type" , "host" ),
@@ -233,9 +246,7 @@ func TestStackMonitoringMonitoredResourceResource_basic(t *testing.T) {
233246 resource .TestCheckResourceAttrSet (resourceName , "id" ),
234247 resource .TestCheckResourceAttrSet (resourceName , "management_agent_id" ),
235248 resource .TestCheckResourceAttr (resourceName , "name" , "terraformResource" ),
236- resource .TestCheckResourceAttr (resourceName , "properties.#" , "1" ),
237- resource .TestCheckResourceAttr (resourceName , "properties.0.name" , "OS" ),
238- resource .TestCheckResourceAttr (resourceName , "properties.0.value" , "Linux" ),
249+ resource .TestCheckResourceAttr (resourceName , "properties.#" , "4" ),
239250 resource .TestCheckResourceAttr (resourceName , "resource_time_zone" , "en" ),
240251 resource .TestCheckResourceAttrSet (resourceName , "tenant_id" ),
241252 resource .TestCheckResourceAttr (resourceName , "type" , "host" ),
@@ -262,9 +273,7 @@ func TestStackMonitoringMonitoredResourceResource_basic(t *testing.T) {
262273 resource .TestCheckResourceAttrSet (singularDatasourceName , "host_name" ),
263274 resource .TestCheckResourceAttrSet (singularDatasourceName , "id" ),
264275 resource .TestCheckResourceAttr (singularDatasourceName , "name" , "terraformResource" ),
265- resource .TestCheckResourceAttr (singularDatasourceName , "properties.#" , "1" ),
266- resource .TestCheckResourceAttr (singularDatasourceName , "properties.0.name" , "OS" ),
267- resource .TestCheckResourceAttr (singularDatasourceName , "properties.0.value" , "Linux" ),
276+ resource .TestCheckResourceAttr (singularDatasourceName , "properties.#" , "4" ),
268277 resource .TestCheckResourceAttr (singularDatasourceName , "resource_time_zone" , "en" ),
269278 resource .TestCheckResourceAttrSet (singularDatasourceName , "state" ),
270279 resource .TestCheckResourceAttrSet (singularDatasourceName , "tenant_id" ),
0 commit comments