Skip to content

Latest commit

 

History

History
66 lines (50 loc) · 2.24 KB

library_script_task.md

File metadata and controls

66 lines (50 loc) · 2.24 KB
page_title subcategory description
morpheus_library_script_task Resource - terraform-provider-morpheus
Provides a Morpheus library script task resource

morpheus_library_script_task

Provides a Morpheus library script task resource

Example Usage

Creating the library script task using a library script data source:

data "morpheus_script_template" "example_script_template" {
  name = "My script template"
}

resource "morpheus_library_script_task" "tf_example_library_script_task" {
  name                = "Example Terraform Library Script Task"
  code                = "tf-example-library-script-task"
  labels              = ["demo", "library", "terraform"]
  execute_target      = "resource"
  script_template     = data.morpheus_script_template.example_script_template.name
  script_template_id  = data.morpheus_script_template.example_script_template.id
  retryable           = true
  retry_count         = 1
  retry_delay_seconds = 10
  allow_custom_config = true
}

Schema

Required

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

Optional

  • allow_custom_config (Boolean) Custom configuration data to pass during the execution of the library script
  • code (String) The code of the library script task
  • execute_target (String) The target for the library script
  • labels (Set of String) The organization labels associated with the library task (Only supported on Morpheus 5.5.3 or higher)
  • result_type (String) The expected result type (value, keyValue, json)
  • retry_count (Number) The number of times to retry the library 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 library task if there is a failure
  • script_template (String) The name of the library script template in Morpheus
  • script_template_id (String) The library script template id in Morpheus
  • visibility (String) The visibility of the task (private or public)

Read-Only

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

Import

Import is supported using the following syntax:

terraform import morpheus_library_script_task.tf_example_library_script_task 1