Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 1.49 KB

script_template.md

File metadata and controls

54 lines (40 loc) · 1.49 KB
page_title subcategory description
morpheus_script_template Resource - terraform-provider-morpheus
Provides a Morpheus script template resource

morpheus_script_template

Provides a Morpheus script template resource

Example Usage

resource "morpheus_script_template" "tfexample_script_template" {
  name           = "tf-terraform-script-template"
  labels         = ["demo", "template", "terraform"]
  script_type    = "bash"
  script_phase   = "provision"
  script_content = <<EOF
echo "testing"
EOF
  run_as_user    = "root"
  sudo           = true
}

Schema

Required

  • name (String) The name of the script template
  • script_phase (String) The phase that the script should be run during (start, stop, preProvision, provision, postProvision, preDeploy, deploy, reconfigure, teardown)
  • script_type (String) The type of the script template (powershell, bash)

Optional

  • labels (Set of String) The organization labels associated with the script template (Only supported on Morpheus 5.5.3 or higher)
  • run_as_user (String) The name of the user account the script should run as
  • script_content (String) The content of the script template
  • sudo (Boolean) Whether the script should run with sudo privileges

Read-Only

  • id (String) The ID of the script template

Import

Import is supported using the following syntax:

terraform import morpheus_script_template.tf_example_script_template 1