Skip to content

Commit 43e26b2

Browse files
committed
feat: bumping the version of the module and allowing the user to determine the title on the notifications
1 parent 059dcb9 commit 43e26b2

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The `terraform-docs` utility is used to generate this README. Follow the below s
5555

5656
| Name | Source | Version |
5757
|------|--------|---------|
58-
| <a name="module_notifications"></a> [notifications](#module\_notifications) | appvia/notifications/aws | 0.1.1 |
58+
| <a name="module_notifications"></a> [notifications](#module\_notifications) | appvia/notifications/aws | 0.1.2 |
5959

6060
## Resources
6161

@@ -70,7 +70,7 @@ The `terraform-docs` utility is used to generate this README. Follow the below s
7070
|------|-------------|------|---------|:--------:|
7171
| <a name="input_create_sns_topic"></a> [create\_sns\_topic](#input\_create\_sns\_topic) | Indicates whether to create an SNS topic for notifications | `bool` | `true` | no |
7272
| <a name="input_monitors"></a> [monitors](#input\_monitors) | A collection of cost anomaly monitors to create | <pre>list(object({<br> name = string<br> # The name of the monitor <br> monitor_type = optional(string, "DIMENSIONAL")<br> # The type of monitor to create <br> monitor_dimension = optional(string, "SERVICE")<br> # The dimension to monitor<br> monitor_specification = optional(string, null)<br> # The specification to monitor <br><br> notify = optional(object({<br> frequency = string<br> # The frequency of notifications<br> threshold_expression = optional(any, null)<br> # The threshold expression to use for notifications<br> }), {<br> frequency = "DAILY"<br> })<br> }))</pre> | n/a | yes |
73-
| <a name="input_notifications"></a> [notifications](#input\_notifications) | The configuration of the notification | <pre>object({<br> email = optional(object({<br> addresses = list(string)<br> }), null)<br> slack = optional(object({<br> channel = string<br> # The channel name for notifications (e.g. #channel-name) <br> secret_name = optional(string, null)<br> # An optional secret name in the AWS Secrets Manager, containing this information <br> lambda_name = optional(string, "cost-anomaly-notification")<br> # The name of the Lambda function to use for notifications <br> webhook_url = string<br> # The URL of the Slack webhook to use for notifications<br> }), null)<br> })</pre> | n/a | yes |
73+
| <a name="input_notifications"></a> [notifications](#input\_notifications) | The configuration of the notification | <pre>object({<br> email = optional(object({<br> addresses = list(string)<br> }), null)<br> slack = optional(object({<br> channel = string<br> # The channel name for notifications (e.g. #channel-name) <br> secret_name = optional(string, null)<br> # An optional secret name in the AWS Secrets Manager, containing this information <br> lambda_name = optional(string, "cost-anomaly-notification")<br> # The name of the Lambda function to use for notifications <br> username = optional(string, "AWS Cost Anomaly Detection")<br> # The username to use for notifications<br> webhook_url = string<br> # The URL of the Slack webhook to use for notifications<br> }), null)<br> })</pre> | n/a | yes |
7474
| <a name="input_sns_topic_name"></a> [sns\_topic\_name](#input\_sns\_topic\_name) | The name of an existing or new SNS topic for notifications | `string` | `"cost-anomaly-notifications"` | no |
7575
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to add to all resources | `map(string)` | n/a | yes |
7676

locals.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ locals {
77
slack = local.enable_slack ? {
88
channel = var.notifications.slack.channel
99
secret_name = var.notifications.slack.secret_name
10-
username = ":aws: AWS Cost Anomaly Detection"
10+
username = var.notifications.slack.username
1111
webhook_url = var.notifications.slack.webhook_url
1212
} : null
1313
}

main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
## Provision the SNS topic for the cost anomaly detection, if required
33
module "notifications" {
44
source = "appvia/notifications/aws"
5-
version = "0.1.1"
5+
version = "0.1.2"
66

77
allowed_aws_services = ["budgets.amazonaws.com", "lambda.amazonaws.com"]
88
create_sns_topic = var.create_sns_topic

variables.tf

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ variable "notifications" {
4141
# An optional secret name in the AWS Secrets Manager, containing this information
4242
lambda_name = optional(string, "cost-anomaly-notification")
4343
# The name of the Lambda function to use for notifications
44+
username = optional(string, "AWS Cost Anomaly Detection")
45+
# The username to use for notifications
4446
webhook_url = string
4547
# The URL of the Slack webhook to use for notifications
4648
}), null)

0 commit comments

Comments
 (0)