page_title | subcategory | description |
---|---|---|
morpheus_ruby_script_task Resource - terraform-provider-morpheus |
Provides a Morpheus ruby script task resource |
Provides a Morpheus ruby script task resource
Creating the ruby script task with local script content:
resource "morpheus_ruby_script_task" "tfexample_ruby_local" {
name = "tfexample_ruby_local"
code = "tfexample_ruby_local"
labels = ["demo", "terraform"]
source_type = "local"
script_content = <<EOF
puts "testing"
EOF
retryable = true
retry_count = 1
retry_delay_seconds = 10
allow_custom_config = true
}
Creating the ruby script task with the script fetched from a url:
resource "morpheus_ruby_script_task" "tfexample_ruby_url" {
name = "tfexample_ruby_url"
code = "tfexample_ruby_url"
labels = ["demo", "terraform"]
source_type = "url"
result_type = "json"
script_path = "https://example.com/example.rb"
retryable = true
retry_count = 1
retry_delay_seconds = 10
allow_custom_config = true
}
Creating the ruby script task with the script fetch via git:
resource "morpheus_ruby_script_task" "tfexample_ruby_git" {
name = "tfexample_ruby_git"
code = "tfexample_ruby_git"
labels = ["demo", "terraform"]
source_type = "repository"
result_type = "json"
script_path = "example.rb"
version_ref = "master"
repository_id = 1
retryable = true
retry_count = 1
retry_delay_seconds = 10
allow_custom_config = true
}
name
(String) The name of the ruby script tasksource_type
(String) The source of the ruby script (local, url or repository)
allow_custom_config
(Boolean) Custom configuration data to pass during the execution of the ruby scriptcode
(String) The code of the ruby script tasklabels
(Set of String) The organization labels associated with the task (Only supported on Morpheus 5.5.3 or higher)repository_id
(Number) The ID of the git repository integrationresult_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 failureretry_delay_seconds
(Number) The number of seconds to wait between retry attemptsretryable
(Boolean) Whether to retry the task if there is a failurescript_content
(String) The content of the ruby script. Used when the local source type is specifiedscript_path
(String) The path of the ruby script, either the url or the path in the repositoryversion_ref
(String) The git reference of the repository to pull (main, master, etc.)
id
(String) The ID of the ruby script task
Import is supported using the following syntax:
terraform import morpheus_ruby_script_task.tf_example_ruby_task_script 1