-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from dheeruk12/main
Add support for sla ,postincidenttasks, task_templates
- Loading branch information
Showing
12 changed files
with
1,235 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "Zenduty: PostIncidentTasks" | ||
subcategory: "" | ||
description: |- | ||
Provides a Zenduty PostIncidentTasks Resource. This allows PostIncidentTasks to be created, updated, and deleted. | ||
--- | ||
|
||
# Resource : zenduty_post_incident_tasks | ||
Provides a Zenduty PostIncidentTasks Resource. This allows PostIncidentTasks to be created, updated, and deleted. | ||
## Example Usage | ||
```hcl | ||
resource "zenduty_teams" "exampleteam" { | ||
name = "exmaple team" | ||
} | ||
``` | ||
|
||
|
||
```hcl | ||
resource "zenduty_post_incident_tasks" "demotask" { | ||
title = "demo task template" | ||
description = "this is a description of demo task" | ||
team_id = zenduty_teams.exampleteam.id | ||
due_in_time = "YYYY-MM-DD HH:MM" | ||
status = 0 | ||
} | ||
``` | ||
|
||
|
||
## Argument Reference | ||
|
||
* `team_id` - (Required) The unique_id of team. | ||
* `title` - (Required) The title of the task. | ||
* `description` - (Required) The description of the task. | ||
* `status` - (Optional) the status of the task choices are `0` is To-Do,`1` is In-Progress, `2`- Done | ||
* `due_in_time` - (Optional) The due time of the task in format YYYY-MM-DD HH:MM. | ||
* `assigned_to` - (Optional) username of the user to assign the task | ||
## Attributes Reference | ||
|
||
The following attributes are exported: | ||
|
||
* `id` - The ID of the Zenduty PostIncidentTasks. | ||
|
||
## Import | ||
|
||
Team PostIncidentTask can be imported using the `team_id`(ie. unique_id of the team) and `task_id`(ie. unique_id of the task template) | ||
|
||
```hcl | ||
resource "zenduty_post_incident_tasks" "demotask" { | ||
} | ||
``` | ||
|
||
`$ terraform import zenduty_post_incident_tasks.demotask team_id/task_id` | ||
|
||
`$ terraform state show zenduty_post_incident_tasks.demotask` | ||
|
||
`* copy the output data and paste inside zenduty_post_incident_tasks.demotask resource block and remove the id attribute` | ||
|
||
`$ terraform plan` to verify the import | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "Zenduty: SLAs" | ||
subcategory: "" | ||
description: |- | ||
Provides a Zenduty SLAs Resource. This allows SLAs to be created, updated, and deleted. | ||
--- | ||
|
||
# Resource : zenduty_sla | ||
Provides a Zenduty SLAs Resource. This allows SLAs to be created, updated, and deleted. | ||
## Example Usage | ||
```hcl | ||
resource "zenduty_teams" "exampleteam" { | ||
name = "exmaple team" | ||
} | ||
data "zenduty_user" "user1" { | ||
email = "demouser@gmail.com" | ||
} | ||
``` | ||
|
||
```hcl | ||
resource "zenduty_sla" "example_sla" { | ||
name = "demo sla" | ||
description = "this is a demo sla" | ||
team_id = zenduty_teams.exampleteam.id | ||
acknowledge_time = 5 | ||
resolve_time = 10 | ||
escalations { | ||
time = 30 | ||
type = 1 | ||
responders { | ||
user = data.zenduty_user.user1.users[0].username | ||
} | ||
} | ||
escalations { | ||
time = -10 | ||
type = 2 | ||
responders { | ||
user = data.zenduty_user.user1.users[0].username | ||
} | ||
} | ||
} | ||
``` | ||
|
||
|
||
## Argument Reference | ||
|
||
* `team_id` - (Required) The unique_id of team to create the sla in. | ||
* `name` - (Required) The name of the sla. | ||
* `description` - (Required) The description of the sla | ||
* `acknowledge_time` - (Required) time in seconds to trigger SLA if not acknowledged. | ||
* `resolve_time` - (Required) Time in seconds to trigger SLA if not resolved. | ||
* `escalations` - (Required) Reminders when an SLA is breached or about to breach. (see [below for nested schema](#nestedblock--escalation)) | ||
|
||
```hcl | ||
escalations { | ||
time = 30 | ||
type = 1 | ||
responders { | ||
user = data.zenduty_user.user1.users[0].username | ||
} | ||
} | ||
``` | ||
|
||
<a id="nestedblock--escalation"></a> | ||
|
||
* `type`: It is an integer field that determines the type of notification behavior. `1` signifies that notifications are sent when the SLA breach is acknowledged, while `2` indicates notifications for resolution SLA breaches. | ||
* `time`: This field specifies the time duration in seconds when notifications should be sent. If time is positive, it means notifications will be sent x seconds after the SLA breach, and if it's negative, notifications will be sent x seconds before the breach. | ||
* `responders` - users who need to be paged when an SLA is breached. (see [below for nested schema](#nestedblock--responders)) | ||
|
||
|
||
<a id="nestedblock--responders"></a> | ||
|
||
```hcl | ||
responders { | ||
user = data.zenduty_user.user1.users[0].username | ||
} | ||
``` | ||
* `user` - Username of the user who will be notified if sla is breached | ||
|
||
|
||
|
||
|
||
|
||
|
||
## Attributes Reference | ||
|
||
The following attributes are exported: | ||
|
||
* `id` - The ID of the Zenduty SlA. | ||
|
||
## Import | ||
|
||
Team SLAs can be imported using the `team_id`(ie. unique_id of the team) and `sla_id`(ie. unique_id of the sla), e.g. | ||
|
||
```hcl | ||
resource "zenduty_sla" "sla1" { | ||
} | ||
``` | ||
|
||
`$ terraform import zenduty_sla.sla1 team_id/sla_id` | ||
|
||
`$ terraform state show zenduty_sla.sla1` | ||
|
||
`* copy the output data and paste inside zenduty_sla.sla1 resource block and remove the id attribute` | ||
|
||
`$ terraform plan` to verify the import | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "Zenduty: TaskTemplateTasks" | ||
subcategory: "" | ||
description: |- | ||
Provides a Zenduty TaskTemplateTasks Resource. This allows TaskTemplateTasks to be created, updated, and deleted. | ||
--- | ||
|
||
# Resource : zenduty_task_template_tasks | ||
Provides a Zenduty TaskTemplateTasks Resource. This allows TaskTemplateTasks to be created, updated, and deleted. | ||
## Example Usage | ||
```hcl | ||
resource "zenduty_teams" "exampleteam" { | ||
name = "exmaple team" | ||
} | ||
resource "zenduty_task_template_tasks" "demotemplate" { | ||
name = "example template" | ||
summary = "this is an example template" | ||
team_id = zenduty_teams.exampleteam.id | ||
} | ||
resource "zenduty_roles" "example_role" { | ||
team = zenduty_teams.exampleteam.id | ||
title = "Example Role" | ||
description = "Role Description" | ||
} | ||
``` | ||
|
||
|
||
```hcl | ||
resource "zenduty_task_template_tasks" "demotask" { | ||
team_id = "af0e6c8a-c895-434c-b667-2f44833e15b6" | ||
task_template_id = zenduty_task_template_tasks.demotemplate.id | ||
title = "demo task" | ||
description = "this is a description of demo task" | ||
role = zenduty_roles.example_role.id | ||
} | ||
``` | ||
|
||
|
||
## Argument Reference | ||
|
||
* `team_id` - (Required) The unique_id of team. | ||
* `task_template_id` - (Required) The unique_id of tasktemplate to create the tasktemplatetasks in. | ||
* `title` - (Required) The title of the task. | ||
* `description` - (Required) The description of the task. | ||
* `role` - (Optional) The unique_id of incident role attached to the task | ||
* `due_in` - (Optional) Time in minutes to complete the task `-1` => no due time | ||
|
||
## Attributes Reference | ||
|
||
The following attributes are exported: | ||
|
||
* `id` - The ID of the Zenduty TaskTemplateTask. | ||
|
||
## Import | ||
|
||
Team TaskTemplate can be imported using the `team_id`(ie. unique_id of the team) and `task_template_id`(ie. unique_id of the task template), and `task_template_task_id` (ie. unique_id of the task template task id) . | ||
|
||
```hcl | ||
resource "zenduty_task_template_tasks" "demotemplatetask" { | ||
} | ||
``` | ||
|
||
`$ terraform import zenduty_task_template_tasks.demotemplatetask team_id/task_template_id/task_template_task_id` | ||
|
||
`$ terraform state show zenduty_task_template_tasks.demotemplatetask` | ||
|
||
`* copy the output data and paste inside zenduty_task_template_tasks.demotemplatetask resource block and remove the id attribute` | ||
|
||
`$ terraform plan` to verify the import | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "Zenduty: TaskTemplates" | ||
subcategory: "" | ||
description: |- | ||
Provides a Zenduty TaskTemplates Resource. This allows TaskTemplates to be created, updated, and deleted. | ||
--- | ||
|
||
# Resource : zenduty_task_templates | ||
Provides a Zenduty TaskTemplates Resource. This allows TaskTemplates to be created, updated, and deleted. | ||
## Example Usage | ||
```hcl | ||
resource "zenduty_teams" "exampleteam" { | ||
name = "exmaple team" | ||
} | ||
``` | ||
|
||
```hcl | ||
resource "zenduty_task_templates" "demotemplate" { | ||
name = "example template" | ||
summary = "this is an example template" | ||
team_id = zenduty_teams.exampleteam.id | ||
} | ||
``` | ||
|
||
|
||
## Argument Reference | ||
|
||
* `team_id` - (Required) The unique_id of team to create the tasktemplate in. | ||
* `name` - (Required) The name of the tasktemplate. | ||
* `summary` - (Required) The summary of the tasktemplate. | ||
|
||
## Attributes Reference | ||
|
||
The following attributes are exported: | ||
|
||
* `id` - The ID of the Zenduty TaskTemplate. | ||
|
||
## Import | ||
|
||
Team TaskTemplate can be imported using the `team_id`(ie. unique_id of the team) and `task_template_id`(ie. unique_id of the task template), e.g. | ||
|
||
```hcl | ||
resource "zenduty_task_templates" "demotemplate" { | ||
} | ||
``` | ||
|
||
`$ terraform import zenduty_task_templates.demotemplate team_id/task_template_id` | ||
|
||
`$ terraform state show zenduty_task_templates.demotemplate` | ||
|
||
`* copy the output data and paste inside zenduty_task_templates.demotemplate resource block and remove the id attribute` | ||
|
||
`$ terraform plan` to verify the import | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.