oci_stack_monitoring_maintenance_window
This resource provides the Maintenance Window resource in Oracle Cloud Infrastructure Stack Monitoring service. Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/stack-monitoring/latest/MaintenanceWindow
Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/stack_monitoring
Creates a new Maintenance Window for the given resources. It will create also the Alarms Suppression for each alarm that the resource migth trigger.
Example Usage
resource "oci_stack_monitoring_maintenance_window" "test_maintenance_window" {
#Required
compartment_id = var.compartment_id
name = var.maintenance_window_name
resources {
#Required
resource_id = oci_cloud_guard_resource.test_resource.id
#Optional
are_members_included = var.maintenance_window_resources_are_members_included
}
schedule {
#Required
schedule_type = var.maintenance_window_schedule_schedule_type
#Optional
maintenance_window_duration = var.maintenance_window_schedule_maintenance_window_duration
maintenance_window_recurrences = var.maintenance_window_schedule_maintenance_window_recurrences
time_maintenance_window_end = var.maintenance_window_schedule_time_maintenance_window_end
time_maintenance_window_start = var.maintenance_window_schedule_time_maintenance_window_start
}
#Optional
defined_tags = {"foo-namespace.bar-key"= "value"}
description = var.maintenance_window_description
freeform_tags = {"bar-key"= "value"}
}
Argument Reference
The following arguments are supported:
compartment_id- (Required) Compartment Identifier OCID.defined_tags- (Optional) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:{"foo-namespace.bar-key": "value"}description- (Optional) (Updatable) Maintenance Window description.freeform_tags- (Optional) (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:{"bar-key": "value"}name- (Required) Maintenance Window name.resources- (Required) (Updatable) List of resource Ids which are part of the Maintenance Windoware_members_included- (Optional) (Updatable) Flag to indicate if the members of the resource has to be include in the Maintenance Window.resource_id- (Required) (Updatable) The OCID of monitored resource part of the Maintenance window.
schedule- (Required) (Updatable) Schedule information of the Maintenance Windowmaintenance_window_duration- (Applicable when schedule_type=RECURRENT) (Updatable) Duration time of each recurrence of each Maintenance Window. It must be specified as a string in ISO 8601 extended format.maintenance_window_recurrences- (Required when schedule_type=RECURRENT) (Updatable) A RFC5545 formatted recurrence string which represents the Maintenance Window Recurrence. Please refer this for details:https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10 FREQ: Frequency of the Maintenance Window. The supported values are: DAILY and WEEKLY. BYDAY: Comma separated days for Weekly Maintenance Window. BYHOUR: Specifies the start hour of each recurrence aftertimeMaintenanceWindowStartvalue. BYMINUTE: Specifies the start minute of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 BYSECOND: Specifies the start second of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 Other Rules are not supported.schedule_type- (Required) (Updatable) Property to identify the type of the Maintenance Window.time_maintenance_window_end- (Optional) (Updatable) Start time of Maintenance window. A RFC3339 formatted datetime stringtime_maintenance_window_start- (Optional) (Updatable) Start time of Maintenance window. A RFC3339 formatted datetime string
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
Attributes Reference
The following attributes are exported:
compartment_id- Compartment Identifier OCID.defined_tags- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:{"foo-namespace.bar-key": "value"}description- Maintenance Window description.freeform_tags- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:{"bar-key": "value"}id- The OCID of maintenance window.lifecycle_details- Lifecycle Details of the Maintenance Window.name- Maintenance Window name.resources- List of resource Ids which are part of the Maintenance Windoware_members_included- Flag to indicate if the members of the resource has to be include in the Maintenance Window.resource_id- The OCID of monitored resource part of the Maintenance window.
resources_details- List of resource details that are part of the Maintenance Window.name- Name of the monitored resourcenumber_of_members- Number of members of the resourceresource_id- The OCID of monitored resource part of the Maintenance window.type- Type of the monitored resource
schedule- Schedule information of the Maintenance Windowmaintenance_window_duration- Duration time of each recurrence of each Maintenance Window. It must be specified as a string in ISO 8601 extended format.maintenance_window_recurrences- A RFC5545 formatted recurrence string which represents the Maintenance Window Recurrence. Please refer this for details:https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10 FREQ: Frequency of the Maintenance Window. The supported values are: DAILY and WEEKLY. BYDAY: Comma separated days for Weekly Maintenance Window. BYHOUR: Specifies the start hour of each recurrence aftertimeMaintenanceWindowStartvalue. BYMINUTE: Specifies the start minute of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 BYSECOND: Specifies the start second of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 Other Rules are not supported.schedule_type- Property to identify the type of the Maintenance Window.time_maintenance_window_end- Start time of Maintenance window. A RFC3339 formatted datetime stringtime_maintenance_window_start- Start time of Maintenance window. A RFC3339 formatted datetime string
state- Lifecycle state of the monitored resource.system_tags- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:{"orcl-cloud.free-tier-retained": "true"}time_created- The time the the maintenance window was created. An RFC3339 formatted datetime stringtime_updated- The time the the mainteance window was updated. An RFC3339 formatted datetime string
Timeouts
The timeouts block allows you to specify timeouts for certain operations:
* create - (Defaults to 20 minutes), when creating the Maintenance Window
* update - (Defaults to 20 minutes), when updating the Maintenance Window
* delete - (Defaults to 20 minutes), when destroying the Maintenance Window
Import
MaintenanceWindows can be imported using the id, e.g.
$ terraform import oci_stack_monitoring_maintenance_window.test_maintenance_window "id"