page_title | subcategory | description |
---|---|---|
morpheus_email_task Resource - terraform-provider-morpheus |
Provides a Morpheus email task resource |
Provides a Morpheus email task resource
Creating the email task with local email template content:
resource "morpheus_email_task" "tfexample_email" {
name = "tfexample_email"
code = "tfexample_email"
labels = ["demo", "terraform"]
email_address = "<%=instance.createdByEmail%>"
subject = "<%=instance.hostname%> provisioning complete"
source = "local"
content = "Your instance <%=instance.hostname%> was provisioned."
skip_wrapped_email_template = false
retryable = true
retry_count = 1
retry_delay_seconds = 10
allow_custom_config = true
}
Creating the email task with the email template fetched from a url:
resource "morpheus_email_task" "tfexample_email_url" {
name = "tfexample_email_url"
code = "tfexample_email_url"
labels = ["demo", "terraform"]
email_address = "<%=instance.createdByEmail%>"
subject = "<%=instance.hostname%> provisioning complete"
source = "url"
content_url = "https://example.com/example.txt"
skip_wrapped_email_template = false
retryable = true
retry_count = 1
retry_delay_seconds = 10
allow_custom_config = true
}
Creating the email task with the email template fetched via git:
resource "morpheus_email_task" "tfexample_email_git" {
name = "tfexample_email_git"
code = "tfexample_email_git"
labels = ["demo", "terraform"]
email_address = "<%=instance.createdByEmail%>"
subject = "<%=instance.hostname%> provisioning complete"
source = "repository"
content_path = "example.txt"
repository_id = 1
version_ref = "main"
skip_wrapped_email_template = false
retryable = true
retry_count = 1
retry_delay_seconds = 10
allow_custom_config = true
}
email_address
(String) Email addresses can be entered literally or Morpheus automation variables can be injected, such as <%=instance.createdByEmail%>name
(String) The name of the email tasksubject
(String) The subject line of the email, Morpheus automation variables can be injected into the subject field
allow_custom_config
(Boolean) Custom configuration data to pass during the execution of the email taskcode
(String) The code of the email taskcontent
(String) The body of the email is HTML. Morpheus automation variables can be injected into the email body when needed. Used with a source type of localcontent_path
(String) The file path of the template used for the email task, used with a source type of repositorycontent_url
(String) The URL of the template used for the email task, used with a source type of urllabels
(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 to fetch the email templateretry_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 failureskip_wrapped_email_template
(Boolean) Whether to ignore the Morpheus-styled email templatesource
(String) Choose local to draft or paste the email directly into the Task. Choose Repository or URL to bring in a template from a Git repository or another outside source (local, repository, url)version_ref
(String) The git reference of the repository to pull (main, master, etc.)
id
(String) The ID of the email task
Import is supported using the following syntax:
terraform import morpheus_email_task.tf_example_email_task 1