oci_resource_scheduler_schedule

This resource provides the Schedule resource in Oracle Cloud Infrastructure Resource Scheduler service.

Creates a Schedule

Example Usage

resource "oci_resource_scheduler_schedule" "test_schedule" {
  #Required
  action             = var.schedule_action
  compartment_id     = var.compartment_id
  recurrence_details = var.schedule_recurrence_details
  recurrence_type    = var.schedule_recurrence_type

  resource_filters {
    # Required
    attribute = "DEFINED_TAGS"
    value {
      namespace="SampleNamespace"
      tag_key="SampleTagKey"
      value="SampleValue"
    }
  }
  resource_filters {
    # Required
    attribute = "LIFECYCLE_STATE"
    value {
      value="SampleLifecycleState"
    }
  }
  resource_filters {
    # Required
    attribute = "COMPARTMENT_ID"
    value {
      value=var.compartment_id
    }
  }

  #Optional
  defined_tags  = map(oci_identity_tag_namespace.tag-namespace1.name.oci_identity_tag.tag1.name, var.schedule_defined_tags_value)
  description   = var.schedule_description
  display_name  = var.schedule_display_name
  freeform_tags = var.schedule_freeform_tags
  time_ends   = var.schedule_time_ends
  time_starts = var.schedule_time_starts
}

Argument Reference

The following arguments are supported:

** 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:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 20 minutes), when creating the Schedule * update - (Defaults to 20 minutes), when updating the Schedule * delete - (Defaults to 20 minutes), when destroying the Schedule

Import

Schedules can be imported using the id, e.g.

$ terraform import oci_resource_scheduler_schedule.test_schedule "id"