Skip to content

Commit

Permalink
feat: added email integration
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Theuermann <[email protected]>
  • Loading branch information
mati007thm committed Dec 4, 2024
1 parent aa6248a commit e47ffa3
Show file tree
Hide file tree
Showing 5 changed files with 522 additions and 0 deletions.
73 changes: 73 additions & 0 deletions docs/resources/integration_email.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mondoo_integration_email Resource - terraform-provider-mondoo"
subcategory: ""
description: |-
Send an email message to your ticket system (or any destination).
---

# mondoo_integration_email (Resource)

Send an email message to your ticket system (or any destination).

## Example Usage

```terraform
provider "mondoo" {
space = "hungry-poet-123456"
}
# Setup the Email integration
resource "mondoo_integration_email" "email_integration" {
name = "My Email Integration"
recipients = [
{
name = "John Doe"
email = "[email protected]"
is_default = true
reference_url = "https://example.com"
},
{
name = "Alice Doe"
email = "[email protected]"
is_default = false
reference_url = "https://example.com"
}
]
auto_create = true
auto_close = true
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String) Name of the integration.
- `recipients` (Attributes List) List of email recipients. (see [below for nested schema](#nestedatt--recipients))

### Optional

- `auto_close` (Boolean) Auto close tickets.
- `auto_create` (Boolean) Auto create tickets.
- `space_id` (String) Mondoo Space Identifier. If it is not provided, the provider space is used.

### Read-Only

- `mrn` (String) Integration identifier

<a id="nestedatt--recipients"></a>
### Nested Schema for `recipients`

Required:

- `email` (String) Recipient email address.
- `name` (String) Recipient name.

Optional:

- `is_default` (Boolean) Mark this recipient as default. This needs to be set if auto_create is enabled.
- `reference_url` (String) Reference URL for the recipient.
8 changes: 8 additions & 0 deletions examples/resources/mondoo_integration_email/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
terraform {
required_providers {
mondoo = {
source = "mondoohq/mondoo"
version = ">= 0.19"
}
}
}
26 changes: 26 additions & 0 deletions examples/resources/mondoo_integration_email/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
provider "mondoo" {
space = "hungry-poet-123456"
}

# Setup the Email integration
resource "mondoo_integration_email" "email_integration" {
name = "My Email Integration"

recipients = [
{
name = "John Doe"
email = "[email protected]"
is_default = true
reference_url = "https://example.com"
},
{
name = "Alice Doe"
email = "[email protected]"
is_default = false
reference_url = "https://example.com"
}
]

auto_create = true
auto_close = true
}
Loading

0 comments on commit e47ffa3

Please sign in to comment.