Skip to content

Commit

Permalink
feat/SA-251: notifications - conditional slack and teams resources (#35)
Browse files Browse the repository at this point in the history
* feat: notifications - conditional slack and teams resources

* test: cannot default to null on accounts_id_to_name

* chore: and the README of course for change in variable default
  • Loading branch information
wozzer72 authored Sep 12, 2024
1 parent f898619 commit c814aa6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module "account_baseline_alarms" {

| Name | Source | Version |
|------|--------|---------|
| <a name="module_notifications"></a> [notifications](#module\_notifications) | appvia/notifications/aws | 1.0.2 |
| <a name="module_notifications"></a> [notifications](#module\_notifications) | appvia/notifications/aws | 1.0.3 |

## Resources

Expand Down Expand Up @@ -87,7 +87,7 @@ module "account_baseline_alarms" {
|------|-------------|------|---------|:--------:|
| <a name="input_notification"></a> [notification](#input\_notification) | The configuration for how to send notifications. | <pre>object({<br> email = optional(object({<br> addresses = list(string)<br> }), null)<br> slack = optional(object({<br> lambda_name = optional(string, "alarms-notifications")<br> webhook_url = string<br> }), null)<br> teams = optional(object({<br> webhook_url = string<br> }), null)<br> })</pre> | n/a | yes |
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to add to all resources | `map(string)` | n/a | yes |
| <a name="input_accounts_id_to_name"></a> [accounts\_id\_to\_name](#input\_accounts\_id\_to\_name) | A mapping of account id and account name - used by notification lamdba to map an account ID to a human readable name | `map(string)` | `null` | no |
| <a name="input_accounts_id_to_name"></a> [accounts\_id\_to\_name](#input\_accounts\_id\_to\_name) | A mapping of account id and account name - used by notification lamdba to map an account ID to a human readable name | `map(string)` | `{}` | no |
| <a name="input_alarm_namespace"></a> [alarm\_namespace](#input\_alarm\_namespace) | The cloudwatch alarm namespace. | `string` | `"cis-benchmark"` | no |
| <a name="input_cloudtrail_log_group_name"></a> [cloudtrail\_log\_group\_name](#input\_cloudtrail\_log\_group\_name) | The name of the CloudTrail log group to filter on. | `string` | `"aws-controltower/CloudTrailLogs"` | no |
| <a name="input_create_sns_topic"></a> [create\_sns\_topic](#input\_create\_sns\_topic) | The boolean flag whether to create the SNS topic for alarms. | `bool` | `true` | no |
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Provision the notifications
module "notifications" {
source = "appvia/notifications/aws"
version = "1.0.2"
version = "1.0.3"

allowed_aws_services = ["cloudwatch.amazonaws.com"]
create_sns_topic = var.create_sns_topic
Expand Down
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -154,5 +154,5 @@ variable "tags" {
variable "accounts_id_to_name" {
description = "A mapping of account id and account name - used by notification lamdba to map an account ID to a human readable name"
type = map(string)
default = null
}
default = {}
}

0 comments on commit c814aa6

Please sign in to comment.