From 89a243fd2c923c8e89694020c94dac0b5024a9fd Mon Sep 17 00:00:00 2001 From: Brett Wright Date: Mon, 2 Nov 2020 12:54:24 +0100 Subject: [PATCH 1/3] Added email config doco --- docs/resources/config_email.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docs/resources/config_email.md diff --git a/docs/resources/config_email.md b/docs/resources/config_email.md new file mode 100644 index 0000000..2bff57d --- /dev/null +++ b/docs/resources/config_email.md @@ -0,0 +1,20 @@ +# Resource: harbor_config_system + +## Example Usage + +```hcl +resource "harbor_config_email" "main" { + email_host = "server.acme.com" + email_from = "dont_reply@acme.com" +} +``` + +## Argument Reference +The following arguments are supported: + +* **email_host** - (Required) The FQDN of the email server +* **email_port** - (Optional) The smtp port for the email server `Default: 25` +* **email_username** - (Optional) The username for the email server +* **email_password** - (Optional) The password for the email server +* **email_from** - (Required) - The email from address ie, `dont_reply@acme.com` +* **email_ssl** - (Optional) Enable SSL for email server connection \ No newline at end of file From cfa2c2064844ee53f1dd18d7bcedc7470959e80f Mon Sep 17 00:00:00 2001 From: Brett Wright Date: Mon, 2 Nov 2020 12:55:38 +0100 Subject: [PATCH 2/3] Fixed bug with email port --- provider/resource_config_email.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/provider/resource_config_email.go b/provider/resource_config_email.go index f4218ab..bcdb6ee 100644 --- a/provider/resource_config_email.go +++ b/provider/resource_config_email.go @@ -14,8 +14,9 @@ func resourceConfigEmail() *schema.Resource { Required: true, }, "email_port": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeInt, + Optional: true, + Default: 25, }, "email_username": { Type: schema.TypeString, From 74a1413232193327bab0c2a63a5a6ba4853c6ad8 Mon Sep 17 00:00:00 2001 From: Brett Wright Date: Mon, 2 Nov 2020 12:57:14 +0100 Subject: [PATCH 3/3] fixed up white space --- docs/resources/config_email.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/resources/config_email.md b/docs/resources/config_email.md index 2bff57d..0c2d593 100644 --- a/docs/resources/config_email.md +++ b/docs/resources/config_email.md @@ -4,8 +4,8 @@ ```hcl resource "harbor_config_email" "main" { - email_host = "server.acme.com" - email_from = "dont_reply@acme.com" + email_host = "server.acme.com" + email_from = "dont_reply@acme.com" } ```