|
37 | 37 | "id": Representation{repType: Required, create: `${oci_osmanagement_software_source.test_child_software_source.id}`}, |
38 | 38 | } |
39 | 39 |
|
| 40 | + osmsInstanceAgentConfigRepresentation = map[string]interface{}{ |
| 41 | + "are_all_plugins_disabled": Representation{repType: Required, create: `false`, update: `false`}, |
| 42 | + "is_management_disabled": Representation{repType: Required, create: `false`, update: `false`}, |
| 43 | + "is_monitoring_disabled": Representation{repType: Required, create: `false`, update: `false`}, |
| 44 | + "plugins_config": RepresentationGroup{Required, autonomousInstanceAgentConfigPluginsConfigRepresentation}, |
| 45 | + } |
| 46 | + |
| 47 | + autonomousInstanceAgentConfigPluginsConfigRepresentation = map[string]interface{}{ |
| 48 | + "desired_state": Representation{repType: Required, create: `ENABLED`}, |
| 49 | + "name": Representation{repType: Required, create: `Oracle Autonomous Linux`}, |
| 50 | + } |
| 51 | + |
40 | 52 | managedInstanceGroupsRepresentation = map[string]interface{}{ |
41 | 53 | "display_name": Representation{repType: Required, create: `${oci_osmanagement_managed_instance_group.test_managed_instance_group.display_name}`}, |
42 | 54 | "id": Representation{repType: Required, create: `${oci_osmanagement_managed_instance_group.test_managed_instance_group.id}`}, |
|
83 | 95 | ManagedInstanceManagementResourceDependencies = generateResourceFromRepresentationMap("oci_core_instance", "test_instance", Required, Create, representationCopyWithNewProperties(instanceRepresentation, map[string]interface{}{ |
84 | 96 | "create_vnic_details": RepresentationGroup{Required, vnicDetailsRepresentation}, |
85 | 97 | "source_details": RepresentationGroup{Required, sourceDetailsRepresentation}, |
| 98 | + "agent_config": RepresentationGroup{Required, osmsInstanceAgentConfigRepresentation}, |
86 | 99 | "image": Representation{repType: Required, create: `${var.OsManagedImageOCID[var.region]}`}, |
87 | 100 | })) + |
88 | 101 | generateResourceFromRepresentationMap("oci_core_vcn", "test_vcn", Required, Create, representationCopyWithNewProperties(vcnRepresentation, map[string]interface{}{ |
@@ -123,7 +136,7 @@ func TestOsmanagementManagedInstanceManagementResource_basic(t *testing.T) { |
123 | 136 | Config: config + compartmentIdVariableStr + ManagedInstanceManagementResourceDependencies + osmanagementSoftwareSourceRepresentation, |
124 | 137 | Check: func(s *terraform.State) (err error) { |
125 | 138 | log.Printf("[DEBUG] OS Management Resource should be created after 2 minutes as OS Agent takes time to activate") |
126 | | - time.Sleep(2 * time.Minute) |
| 139 | + time.Sleep(5 * time.Minute) |
127 | 140 | return nil |
128 | 141 | }, |
129 | 142 | }, |
|
0 commit comments