Skip to content

Latest commit

 

History

History
57 lines (43 loc) · 1.64 KB

javascript_task.md

File metadata and controls

57 lines (43 loc) · 1.64 KB
page_title subcategory description
morpheus_javascript_task Resource - terraform-provider-morpheus
Provides a Morpheus javascript task resource

morpheus_javascript_task

Provides a Morpheus javascript task resource

Example Usage

resource "morpheus_javascript_task" "tfexample_javascript" {
  name                = "tfexample_javascript"
  code                = "tfexample_javascript"
  labels              = ["demo", "terraform"]
  script_content      = <<EOF
console.log("testing")
EOF
  retryable           = true
  retry_count         = 1
  retry_delay_seconds = 10
  allow_custom_config = true
}

Schema

Required

  • name (String) The name of the javascript script task

Optional

  • allow_custom_config (Boolean) Custom configuration data to pass during the execution of the javascript script
  • code (String) The code of the javascript script task
  • labels (Set of String) The organization labels associated with the task (Only supported on Morpheus 5.5.3 or higher)
  • result_type (String) The expected result type (single value, key pairs, json)
  • retry_count (Number) The number of times to retry the task if there is a failure
  • retry_delay_seconds (Number) The number of seconds to wait between retry attempts
  • retryable (Boolean) Whether to retry the task if there is a failure
  • script_content (String) The content of the javascript script

Read-Only

  • id (String) The ID of the javascript script task

Import

Import is supported using the following syntax:

terraform import morpheus_javascript_task.tf_example_groovy_script 1