generated from cloudposse/terraform-example-module
-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various fixes and improvements (#11)
* Update config * Update config * Update config * Update config * Update config * Update config * Update config * Update config * Update config * Update config * Update config * Update config * Update config * Update config * Update config * Update config * Update config * Update config * Update config * Update config * Update config * Update config * Update config * Update config * Update config * Update config * Update config
- Loading branch information
Showing
13 changed files
with
91 additions
and
30 deletions.
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
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 |
---|---|---|
|
@@ -113,6 +113,15 @@ users: | |
timezone: "America/New_York" | ||
``` | ||
|
||
|
||
### `existing_users.yaml` | ||
|
||
```yaml | ||
existing_users: | ||
- username: [email protected] | ||
``` | ||
|
||
|
||
### `services.yaml` | ||
|
||
```yaml | ||
|
@@ -126,7 +135,8 @@ services: | |
|
||
```yaml | ||
service_incident_rules: | ||
- service_name: frontend | ||
- name: frontend-service-incident-rule-1 | ||
service_name: frontend | ||
incident_rule: | ||
condition_match_type: match-all | ||
|
@@ -170,9 +180,9 @@ module "opsgenie" { | |
|
||
## Inputs | ||
|
||
| Name | Default | Description | Required | | ||
|:-------------------------------|:---------------------------------:|:--------------------------------------------------------------------------------------------------------------------------------|:--------:| | ||
| `opsgenie_resources` | `{}` | A map generated by sourcing YAML resource definitions (see above). | Yes | | ||
| Name | Default | Description | Required | | ||
|:-------------------------------|:----------------:|:-------------------------------------------------------------------------------|:--------:| | ||
| `opsgenie_resources` | `{}` | A map generated by sourcing YAML resource definitions (see above). | Yes | | ||
|
||
|
||
## Outputs | ||
|
@@ -185,7 +195,8 @@ module "opsgenie" { | |
| `notification_policies` | `name` and `id` of each notification policy | | ||
| `team_routing_rules` | `name` and `id` of each team routing rule | | ||
| `teams` | `name` and `id` of each team | | ||
| `users` | `name` and `id` of each user | | ||
| `users` | `username` and `id` of each user | | ||
| `existing_users` | `username` and `id` of each existing user | | ||
| `services` | `name` and `id` of each service | | ||
| `services` | `name` and `id` of each service | | ||
| `service_incident_rule_ids` | `id` of each service incident rule | |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
data "opsgenie_user" "this" { | ||
for_each = { | ||
for user in local.existing_users : user.username => user | ||
} | ||
|
||
username = each.value.username | ||
} |
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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
locals { | ||
alert_policies = try(var.opsgenie_resources.alert_policies, []) | ||
api_integrations = try(var.opsgenie_resources.api_integrations, []) | ||
escalations = try(var.opsgenie_resources.escalations, []) | ||
notification_policies = try(var.opsgenie_resources.notification_policies, []) | ||
team_routing_rules = try(var.opsgenie_resources.team_routing_rules, []) | ||
teams = try(var.opsgenie_resources.teams, []) | ||
users = try(var.opsgenie_resources.users, []) | ||
services = try(var.opsgenie_resources.services, []) | ||
service_incident_rules = try(var.opsgenie_resources.service_incident_rules, []) | ||
alert_policies = lookup(var.opsgenie_resources, "alert_policies", []) | ||
api_integrations = lookup(var.opsgenie_resources, "api_integrations", []) | ||
escalations = lookup(var.opsgenie_resources, "escalations", []) | ||
notification_policies = lookup(var.opsgenie_resources, "notification_policies", []) | ||
team_routing_rules = lookup(var.opsgenie_resources, "team_routing_rules", []) | ||
teams = lookup(var.opsgenie_resources, "teams", []) | ||
users = lookup(var.opsgenie_resources, "users", []) | ||
existing_users = lookup(var.opsgenie_resources, "existing_users", []) | ||
services = lookup(var.opsgenie_resources, "services", []) | ||
service_incident_rules = lookup(var.opsgenie_resources, "service_incident_rules", []) | ||
} |
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
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