powerscale_cluster_email (Resource)

This resource is used to manage the Cluster Email Settings entity of PowerScale Array. PowerScale Cluster Email Settings provide the ability to configure email settings on the cluster.We can Create, Update and Delete the Cluster Email Settings using this resource. We can also import existing Cluster Email Settings from PowerScale array. Note that, Cluster Email Settings is the native functionality of PowerScale. When creating the resource, we actually load Cluster Email Settings from PowerScale to the resource state.

Example Usage

/*
Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved.

Licensed under the Mozilla Public License Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://mozilla.org/MPL/2.0/


Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

# Available actions: Create, Update, Delete and Import
# If resource arguments are omitted, `terraform apply` will load SmartPools Settings from PowerScale, and save to
# terraform state file.
# If any resource arguments are specified, `terraform apply` will try to load SmartPools Settings (if not loaded) and update the settings.
# `terraform destroy` will delete the resource from terraform state file rather than deleting SmartPools Settings from PowerScale.
# For more information, Please check the terraform state file.

resource "powerscale_cluster_email" "test" {
  settings = {
    # Optional fields when updating.

    # batch_mode = "all"
    # mail_relay = ""
    # mail_sender = ""
    # mail_subject = ""
    # smtp_auth_passwd = ""
    # smtp_auth_security = "none"
    # smtp_auth_username = ""
    # smtp_port = 6225
    # use_smtp_auth = false
    # user_template = ""

  }

}

# After the execution of above resource block, Cluster Email Settings would have been cached in terraform state file, and
# Cluster Email Settings would have been updated on PowerScale.
# For more information, Please check the terraform state file.

Schema

Required

Read-Only

  • id (String) ID of the Cluster Email Settings.

Nested Schema for settings

Optional:

  • batch_mode (String) This setting determines how notifications will be batched together to be sent by email. ’none’ means each notification will be sent separately. ‘severity’ means notifications of the same severity will be sent together. ‘category’ means notifications of the same category will be sent together. ‘all’ means all notifications will be batched together and sent in a single email.
  • mail_relay (String) The address of the SMTP server to be used for relaying the notification messages. An SMTP server is required in order to send notifications. If this string is empty, no emails will be sent.
  • mail_sender (String) The full email address that will appear as the sender of notification messages.
  • mail_subject (String) The subject line for notification messages from this cluster.
  • smtp_auth_passwd (String) Password to authenticate with if SMTP authentication is being used.
  • smtp_auth_security (String) The type of secure communication protocol to use if SMTP is being used. If ’none’, plain text will be used, if ‘starttls’, the encrypted STARTTLS protocol will be used.
  • smtp_auth_username (String) Username to authenticate with if SMTP authentication is being used.
  • smtp_port (Number) The port on the SMTP server to be used for relaying the notification messages.
  • use_smtp_auth (Boolean) If true, this cluster will send SMTP authentication credentials to the SMTP relay server in order to send its notification emails. If false, the cluster will attempt to send its notification emails without authentication.
  • user_template (String) Location of a custom template file that can be used to specify the layout of the notification emails. If this string is empty, the default template will be used.

Read-Only:

  • smtp_auth_passwd_set (Boolean) Indicates if an SMTP authentication password is set.

Import

Import is supported using the following syntax:

# Copyright (c) 2023-2024 Dell Inc., or its subsidiaries. All Rights Reserved.

# Licensed under the Mozilla Public License Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

#     http://mozilla.org/MPL/2.0/


# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# The command is
# terraform import powerscale_cluster_email.email <anystring>
# Example:
terraform import powerscale_cluster_email.email cluster_email
# after running this command, populate the name field and other required parameters in the config file to start managing this resource.
# Note: running "terraform show" after importing shows the current config/state of the resource. You can copy/paste that config to make it easier to manage the resource.