Skip to content

Commit

Permalink
fix(DMVP-changes): Changed module sns topic created in account module
Browse files Browse the repository at this point in the history
  • Loading branch information
Julia Aghamyan committed Aug 15, 2023
1 parent c8a254f commit 16af381
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 122 deletions.
16 changes: 1 addition & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,10 @@ No providers.
| Name | Source | Version |
|------|--------|---------|
| <a name="module_alerts"></a> [alerts](#module\_alerts) | ./modules/alerts/ | n/a |
| <a name="module_alerts_application_channel"></a> [alerts\_application\_channel](#module\_alerts\_application\_channel) | ./modules/alerts/ | n/a |
| <a name="module_aws_cloudwatch_log_metric_filter"></a> [aws\_cloudwatch\_log\_metric\_filter](#module\_aws\_cloudwatch\_log\_metric\_filter) | dasmeta/modules/aws//modules/cloudwatch-log-metric | 1.7.0 |
| <a name="module_eks_monitoring_dashboard"></a> [eks\_monitoring\_dashboard](#module\_eks\_monitoring\_dashboard) | ./modules/dashboard/ | n/a |
| <a name="module_health-check"></a> [health-check](#module\_health-check) | ./modules/alerts/ | n/a |
| <a name="module_monitoring_dashboard"></a> [monitoring\_dashboard](#module\_monitoring\_dashboard) | ./modules/dashboard/ | n/a |
| <a name="module_sns-to-teams"></a> [sns-to-teams](#module\_sns-to-teams) | ./modules/cloudwatch-alarm-actions/ | n/a |
| <a name="module_sns-to-teams-application-channel"></a> [sns-to-teams-application-channel](#module\_sns-to-teams-application-channel) | ./modules/cloudwatch-alarm-actions/ | n/a |
| <a name="module_sns-to-teams-virginia"></a> [sns-to-teams-virginia](#module\_sns-to-teams-virginia) | ./modules/cloudwatch-alarm-actions/ | n/a |

## Resources

Expand All @@ -59,27 +55,17 @@ No resources.
|------|-------------|------|---------|:--------:|
| <a name="input_alerts"></a> [alerts](#input\_alerts) | Alerts | `any` | `[]` | no |
| <a name="input_application_channel_alerts"></a> [application\_channel\_alerts](#input\_application\_channel\_alerts) | Application channel alerts | `any` | `[]` | no |
| <a name="input_application_channel_webhook_url"></a> [application\_channel\_webhook\_url](#input\_application\_channel\_webhook\_url) | Application Teams Channel Webhook URL | `string` | `""` | no |
| <a name="input_application_monitroing_dashboard"></a> [application\_monitroing\_dashboard](#input\_application\_monitroing\_dashboard) | Application for monitoring EKS cluster | `any` | `[]` | no |
| <a name="input_create_alerts"></a> [create\_alerts](#input\_create\_alerts) | Create Alert | `bool` | `true` | no |
| <a name="input_create_application_channel"></a> [create\_application\_channel](#input\_create\_application\_channel) | Create application alert | `bool` | `true` | no |
| <a name="input_eks_monitroing_dashboard"></a> [eks\_monitroing\_dashboard](#input\_eks\_monitroing\_dashboard) | Dashboard for monitoring EKS cluster | `any` | `[]` | no |
| <a name="input_enable_log_base_metrics"></a> [enable\_log\_base\_metrics](#input\_enable\_log\_base\_metrics) | n/a | `bool` | `true` | no |
| <a name="input_enable_teams_notifications"></a> [enable\_teams\_notifications](#input\_enable\_teams\_notifications) | Enable Teams notifications | `bool` | `false` | no |
| <a name="input_fallback_email_addresses"></a> [fallback\_email\_addresses](#input\_fallback\_email\_addresses) | List of fallback email addresses to send notification when lambda failed | `list(string)` | `[]` | no |
| <a name="input_fallback_phone_numbers"></a> [fallback\_phone\_numbers](#input\_fallback\_phone\_numbers) | List of international formatted phone number to send notification when lambda failed | `list(string)` | `[]` | no |
| <a name="input_health_checks"></a> [health\_checks](#input\_health\_checks) | Health\_checks endpoints and paths | `any` | `[]` | no |
| <a name="input_log_base_metrics"></a> [log\_base\_metrics](#input\_log\_base\_metrics) | Log Base Metrics | `any` | `[]` | no |
| <a name="input_name"></a> [name](#input\_name) | Dashboard name | `string` | n/a | yes |
| <a name="input_region"></a> [region](#input\_region) | The region where resources should be managed. In this repository it's secondary because IAM is always global. | `string` | `"eu-central-1"` | no |
| <a name="input_sns_topic_name"></a> [sns\_topic\_name](#input\_sns\_topic\_name) | SNS topic name | `string` | `"cloudwatch-alarm"` | no |
| <a name="input_webhook_url"></a> [webhook\_url](#input\_webhook\_url) | Teams Webhook URL | `string` | `""` | no |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_sns_topic_arn"></a> [sns\_topic\_arn](#output\_sns\_topic\_arn) | n/a |
| <a name="output_sns_topic_arn_application_channel"></a> [sns\_topic\_arn\_application\_channel](#output\_sns\_topic\_arn\_application\_channel) | n/a |
| <a name="output_sns_topic_arn_virginia"></a> [sns\_topic\_arn\_virginia](#output\_sns\_topic\_arn\_virginia) | n/a |
No outputs.
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
15 changes: 5 additions & 10 deletions health-checks-and-alerts.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
locals {
sns_topic_name = var.sns_topic_name
sns_topic_name_virginia = "${var.sns_topic_name}-virginia"
}

module "health-check" {
source = "./modules/alerts/"
count = length(var.health_checks) > 0 ? 1 : 0
Expand All @@ -20,13 +25,3 @@ module "alerts" {
sns_topic = local.sns_topic_name
alerts = var.alerts
}


module "alerts_application_channel" {
source = "./modules/alerts/"

count = var.create_application_channel ? 1 : 0

sns_topic = local.sns_topic_name
alerts = var.application_channel_alerts
}
11 changes: 0 additions & 11 deletions output.tf

This file was deleted.

50 changes: 0 additions & 50 deletions sns-topic.tf

This file was deleted.

36 changes: 0 additions & 36 deletions vaiables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ variable "create_alerts" {
description = "Create Alert"
}

variable "create_application_channel" {
type = bool
default = true
description = "Create application alert"
}

variable "sns_topic_name" {
type = string
default = "cloudwatch-alarm"
Expand All @@ -44,18 +38,6 @@ variable "log_base_metrics" {
description = "Log Base Metrics"
}

variable "webhook_url" {
type = string
description = "Teams Webhook URL"
default = ""
}

variable "application_channel_webhook_url" {
type = string
description = "Application Teams Channel Webhook URL"
default = ""
}

variable "alerts" {
type = any
default = []
Expand All @@ -79,21 +61,3 @@ variable "application_monitroing_dashboard" {
default = []
description = "Application for monitoring EKS cluster"
}

variable "fallback_email_addresses" {
type = list(string)
default = []
description = "List of fallback email addresses to send notification when lambda failed"
}

variable "fallback_phone_numbers" {
type = list(string)
default = []
description = "List of international formatted phone number to send notification when lambda failed"
}

variable "enable_teams_notifications" {
type = bool
default = false
description = "Enable Teams notifications"
}

0 comments on commit 16af381

Please sign in to comment.