@@ -39,14 +39,12 @@ var (
3939 }
4040
4141 ApmSyntheticsApmSyntheticsmonitorDataSourceRepresentation = map [string ]interface {}{
42- "apm_domain_id" : acctest.Representation {RepType : acctest .Required , Create : `${oci_apm_apm_domain.test_apm_domain.id}` },
43- "display_name" : acctest.Representation {RepType : acctest .Optional , Create : `displayName` , Update : `displayName2` },
44- "is_maintenance_window_active" : acctest.Representation {RepType : acctest .Optional , Create : `false` },
45- "is_maintenance_window_set" : acctest.Representation {RepType : acctest .Optional , Create : `false` },
46- "monitor_type" : acctest.Representation {RepType : acctest .Optional , Create : `SCRIPTED_BROWSER` },
47- "script_id" : acctest.Representation {RepType : acctest .Optional , Create : `${oci_apm_synthetics_script.test_script.id}` },
48- "status" : acctest.Representation {RepType : acctest .Optional , Create : `ENABLED` , Update : `DISABLED` },
49- "filter" : acctest.RepresentationGroup {RepType : acctest .Required , Group : ApmSyntheticsmonitorDataSourceFilterRepresentation }}
42+ "apm_domain_id" : acctest.Representation {RepType : acctest .Required , Create : `${oci_apm_apm_domain.test_apm_domain.id}` },
43+ "display_name" : acctest.Representation {RepType : acctest .Optional , Create : `displayName` , Update : `displayName2` },
44+ "monitor_type" : acctest.Representation {RepType : acctest .Optional , Create : `SCRIPTED_BROWSER` },
45+ "script_id" : acctest.Representation {RepType : acctest .Optional , Create : `${oci_apm_synthetics_script.test_script.id}` },
46+ "status" : acctest.Representation {RepType : acctest .Optional , Create : `ENABLED` , Update : `DISABLED` },
47+ "filter" : acctest.RepresentationGroup {RepType : acctest .Required , Group : ApmSyntheticsmonitorDataSourceFilterRepresentation }}
5048 ApmSyntheticsmonitorDataSourceFilterRepresentation = map [string ]interface {}{
5149 "name" : acctest.Representation {RepType : acctest .Required , Create : `display_name` },
5250 "values" : acctest.Representation {RepType : acctest .Required , Create : []string {`${oci_apm_synthetics_monitor.test_monitor.display_name}` }},
5755 "display_name" : acctest.Representation {RepType : acctest .Required , Create : `displayName` , Update : `displayName2` },
5856 "monitor_type" : acctest.Representation {RepType : acctest .Required , Create : `SCRIPTED_BROWSER` },
5957 "repeat_interval_in_seconds" : acctest.Representation {RepType : acctest .Required , Create : `600` , Update : `1200` },
60- "vantage_points" : acctest.Representation {RepType : acctest .Required , Create : [] string { `OraclePublic-us-ashburn-1` } },
58+ "vantage_points" : acctest.RepresentationGroup {RepType : acctest .Required , Group : monitorVantagePointsRepresentation },
6159 "availability_configuration" : acctest.RepresentationGroup {RepType : acctest .Optional , Group : ApmSyntheticsMonitorAvailabilityConfigurationRepresentation },
6260 "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")}` },
6361 "freeform_tags" : acctest.Representation {RepType : acctest .Optional , Create : map [string ]string {"bar-key" : "value" }, Update : map [string ]string {"Department" : "Accounting" }},
7270 "configuration" : acctest.RepresentationGroup {RepType : acctest .Optional , Group : ApmSyntheticsmonitorConfigurationRepresentation },
7371 "script_parameters" : acctest.RepresentationGroup {RepType : acctest .Optional , Group : ApmSyntheticsmonitorScriptParametersRepresentation },
7472 }
73+ monitorVantagePointsRepresentation = map [string ]interface {}{
74+ "name" : acctest.Representation {RepType : acctest .Required , Create : `OraclePublic-us-ashburn-1` },
75+ "display_name" : acctest.Representation {RepType : acctest .Optional , Create : `US East (Ashburn)` },
76+ }
7577
7678 ApmSyntheticsmonitorConfigurationRepresentation = map [string ]interface {}{
7779 "dns_configuration" : acctest.RepresentationGroup {RepType : acctest .Optional , Group : ApmSyntheticsmonitorConfigurationDnsConfigurationRepresentation },
@@ -182,7 +184,7 @@ func TestApmSyntheticsMonitorResource_basic(t *testing.T) {
182184 resource .TestCheckResourceAttr (resourceName , "timeout_in_seconds" , "60" ),
183185 resource .TestCheckResourceAttrSet (resourceName , "vantage_point_count" ),
184186 resource .TestCheckResourceAttr (resourceName , "vantage_points.#" , "1" ),
185- resource .TestCheckResourceAttrSet (resourceName , "vantage_points.0" ),
187+ resource .TestCheckResourceAttrSet (resourceName , "vantage_points.0.name " ),
186188
187189 func (s * terraform.State ) (err error ) {
188190 resId , err = acctest .FromInstanceState (s , resourceName , "id" )
@@ -242,7 +244,7 @@ func TestApmSyntheticsMonitorResource_basic(t *testing.T) {
242244 resource .TestCheckResourceAttr (resourceName , "timeout_in_seconds" , "120" ),
243245 resource .TestCheckResourceAttrSet (resourceName , "vantage_point_count" ),
244246 resource .TestCheckResourceAttr (resourceName , "vantage_points.#" , "1" ),
245- resource .TestCheckResourceAttrSet (resourceName , "vantage_points.0" ),
247+ resource .TestCheckResourceAttrSet (resourceName , "vantage_points.0.name " ),
246248
247249 func (s * terraform.State ) (err error ) {
248250 resId2 , err = acctest .FromInstanceState (s , resourceName , "id" )
@@ -262,8 +264,6 @@ func TestApmSyntheticsMonitorResource_basic(t *testing.T) {
262264 Check : resource .ComposeAggregateTestCheckFunc (
263265 resource .TestCheckResourceAttrSet (datasourceName , "apm_domain_id" ),
264266 resource .TestCheckResourceAttr (datasourceName , "display_name" , "displayName2" ),
265- resource .TestCheckResourceAttr (datasourceName , "is_maintenance_window_active" , "false" ),
266- resource .TestCheckResourceAttr (datasourceName , "is_maintenance_window_set" , "false" ),
267267 resource .TestCheckResourceAttr (datasourceName , "monitor_type" , "SCRIPTED_BROWSER" ),
268268 resource .TestCheckResourceAttrSet (datasourceName , "script_id" ),
269269 resource .TestCheckResourceAttr (datasourceName , "status" , "DISABLED" ),
@@ -320,7 +320,7 @@ func TestApmSyntheticsMonitorResource_basic(t *testing.T) {
320320 resource .TestCheckResourceAttr (singularDatasourceName , "timeout_in_seconds" , "120" ),
321321 resource .TestCheckResourceAttrSet (singularDatasourceName , "vantage_point_count" ),
322322 resource .TestCheckResourceAttr (singularDatasourceName , "vantage_points.#" , "1" ),
323- resource .TestCheckResourceAttrSet (singularDatasourceName , "vantage_points.0" ),
323+ resource .TestCheckResourceAttrSet (singularDatasourceName , "vantage_points.0.name " ),
324324 ),
325325 },
326326 // verify resource import
0 commit comments