oci_jms_task_schedule

This resource provides the Task Schedule resource in Oracle Cloud Infrastructure Jms service. Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/jms/latest/TaskSchedule

Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/jms

Create a task schedule using the information provided.

Example Usage

resource "oci_jms_task_schedule" "test_task_schedule" {
  #Required
  fleet_id              = var.fleet_ocid
  execution_recurrences = "DTSTART=20240805T090000Z;RRULE:FREQ=HOURLY;INTERVAL=3;UNTIL=20240805T170000Z"

  task_details {
    #Required
    task_type = "ADD_INSTALLATION_SITE"

    # Required for task_type="ADD_INSTALLATION_SITE"
    add_installation_site_task_request {
      installation_sites {
        #Optional
        artifact_content_type = "JDK"
        force_install         = false
        headless_mode         = false
        installation_path     = "/example/install/path"
        managed_instance_id   = "example-managed-instance-ocid"
        release_version       = "17.0.0"
      }
      post_installation_actions = []
    }

    # Required for task_type="CRYPTO"
    crypto_task_request {
      #Optional
      recording_duration_in_minutes = 10
      targets {
        #Optional
        application_installation_key = "example-application-installation-key"
        application_key              = "example-application-key"
        container_key                = "example-container-key"
        jre_key                      = "example-jre-key"
        managed_instance_id          = "example-managed-instance-ocid"
      }
      waiting_period_in_minutes = 10
    }

    # Required for task_type="DEPLOYED_APPLICATION_MIGRATION"
    deployed_application_migration_task_request {
      #Optional
      targets {
        #Optional
        deployed_application_installation_key = "example-application-installation-key"
        exclude_package_prefixes              = []
        include_package_prefixes              = []
        managed_instance_id                   = "example-managed-instance-ocid"
        source_jdk_version                    = "11"
        target_jdk_version                    = "21"
      }
    }

    # Required for task_type="JAVA_MIGRATION"
    java_migration_task_request {
      #Optional
      targets {
        #Optional
        application_installation_key = "example-application-installation-key"
        exclude_package_prefixes     = []
        include_package_prefixes     = []
        managed_instance_id          = "example-managed-instance-ocid"
        source_jdk_version           = "11"
        target_jdk_version           = "21"
      }
    }

    # Required for task_type="JFR"
    jfr_task_request {
      #Optional
      jfc_profile_name              = "jfcV1"
      jfc_v1                        = "jfcV1"
      jfc_v2                        = "jfvV2"
      recording_duration_in_minutes = 10
      recording_size_in_mb          = 10
      targets {
        #Optional
        application_installation_key = "example-application-installation-key"
        application_key              = "example-application-key"
        container_key                = "example-container-key"
        jre_key                      = "example-jre-key"
        managed_instance_id          = "example-managed-instance-ocid"
      }
      waiting_period_in_minutes = 10
    }

    # Required for task_type="PERFORMANCE_TUNING"
    performance_tuning_task_request {
      #Optional
      recording_duration_in_minutes = 10
      targets {
        #Optional
        application_installation_key = "example-application-installation-key"
        application_key              = "example-application-key"
        container_key                = "example-container-key"
        jre_key                      = "example-jre-key"
        managed_instance_id          = "example-managed-instance-ocid"
      }
      waiting_period_in_minutes = 10
    }

    # Required for task_type="REMOVE_INSTALLATION_SITE"
    remove_installation_site_task_request {
      #Optional
      installation_sites {
        #Optional
        installation_key    = "example-jvm-installation-key"
        managed_instance_id = "example-managed-instance-ocid"
      }
    }

    # Required for task_type="SCAN_JAVA_SERVER"
    scan_java_server_task_request {
      #Optional
      managed_instance_ids = []
    }

    # Required for task_type="SCAN_LIBRARY"
    scan_library_task_request {
      #Optional
      dynamic_scan_duration_in_minutes = 10
      is_dynamic_scan                  = false
      managed_instance_ids             = []
    }

  }
}

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 Task Schedule * update - (Defaults to 20 minutes), when updating the Task Schedule * delete - (Defaults to 20 minutes), when destroying the Task Schedule

Import

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

$ terraform import oci_jms_task_schedule.test_task_schedule "id"