Skip to content

Commit

Permalink
chore: updating the notifications module
Browse files Browse the repository at this point in the history
  • Loading branch information
gambol99 committed Apr 27, 2024
1 parent af8fefb commit b7d5ec3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
44 changes: 23 additions & 21 deletions modules/budgets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,46 +88,48 @@ The `terraform-docs` utility is used to generate this README. Follow the below s
3. Run `terraform-docs markdown table --output-file ${PWD}/README.md --output-mode inject .`

<!-- BEGIN_TF_DOCS -->

## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.0 |
| Name | Version |
| ------------------------------------------------------------------------ | ------- |
| <a name="requirement_terraform"></a> [terraform](#requirement_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement_aws) | ~> 5.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.39.1 |
| Name | Version |
| ------------------------------------------------ | ------- |
| <a name="provider_aws"></a> [aws](#provider_aws) | 5.39.1 |

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_notifications"></a> [notifications](#module\_notifications) | terraform-aws-modules/sns/aws | v6.0.1 |
| <a name="module_slack"></a> [slack](#module\_slack) | terraform-aws-modules/notify-slack/aws | 6.1.1 |
| Name | Source | Version |
| -------------------------------------------------------------------------- | -------------------------------------- | ------- |
| <a name="module_notifications"></a> [notifications](#module_notifications) | terraform-aws-modules/sns/aws | v6.0.1 |
| <a name="module_slack"></a> [slack](#module_slack) | terraform-aws-modules/notify-slack/aws | 6.1.1 |

## Resources

| Name | Type |
|------|------|
| [aws_budgets_budget.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/budgets_budget) | resource |
| Name | Type |
| ----------------------------------------------------------------------------------------------------------------------------- | ----------- |
| [aws_budgets_budget.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/budgets_budget) | resource |
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_budgets"></a> [budgets](#input\_budgets) | A collection of budgets to provision | <pre>list(object({<br> name = string<br> budget_type = optional(string, "COST")<br> limit_amount = optional(string, "100.0")<br> limit_unit = optional(string, "PERCENTAGE")<br> time_unit = optional(string, "MONTHLY")<br><br> notification = optional(object({<br> comparison_operator = string<br> threshold = number<br> threshold_type = string<br> notification_type = string<br> }), null)<br><br> auto_adjust_data = optional(list(object({<br> auto_adjust_type = string<br> })), [])<br><br> cost_filter = optional(list(object({<br> name = string<br> values = list(string)<br> })), [])<br><br> cost_types = optional(object({<br> include_credit = optional(bool, false)<br> include_discount = optional(bool, false)<br> include_other_subscription = optional(bool, false)<br> include_recurring = optional(bool, false)<br> include_refund = optional(bool, false)<br> include_subscription = optional(bool, false)<br> include_support = optional(bool, false)<br> include_tax = optional(bool, false)<br> include_upfront = optional(bool, false)<br> use_blended = optional(bool, false)<br> }), {<br> include_credit = false<br> include_discount = false<br> include_other_subscription = false<br> include_recurring = false<br> include_refund = false<br> include_subscription = true<br> include_support = false<br> include_tax = false<br> include_upfront = false<br> use_blended = false<br> })<br> }))</pre> | `[]` | no |
| <a name="input_create_sns_topic"></a> [create\_sns\_topic](#input\_create\_sns\_topic) | A flag to determine if the SNS topic should be created | `bool` | `true` | no |
| <a name="input_notification"></a> [notification](#input\_notification) | The configuration as to how the budget notifications should be sent | <pre>object({<br> email = optional(object({<br> addresses = list(string)<br> }), null)<br> slack = optional(object({<br> channel = string<br> lambda_name = optional(string, "budget-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_sns_topic_name"></a> [sns\_topic\_name](#input\_sns\_topic\_name) | The name of the SNS topic to create for budget notifications | `string` | `"budget-notifications"` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to add to all resources | `map(string)` | `{}` | no |
| Name | Description | Type | Default | Required |
| --------------------------------------------------------------------------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | :------: |
| <a name="input_budgets"></a> [budgets](#input_budgets) | A collection of budgets to provision | <pre>list(object({<br> name = string<br> budget_type = optional(string, "COST")<br> limit_amount = optional(string, "100.0")<br> limit_unit = optional(string, "PERCENTAGE")<br> time_unit = optional(string, "MONTHLY")<br><br> notification = optional(object({<br> comparison_operator = string<br> threshold = number<br> threshold_type = string<br> notification_type = string<br> }), null)<br><br> auto_adjust_data = optional(list(object({<br> auto_adjust_type = string<br> })), [])<br><br> cost_filter = optional(list(object({<br> name = string<br> values = list(string)<br> })), [])<br><br> cost_types = optional(object({<br> include_credit = optional(bool, false)<br> include_discount = optional(bool, false)<br> include_other_subscription = optional(bool, false)<br> include_recurring = optional(bool, false)<br> include_refund = optional(bool, false)<br> include_subscription = optional(bool, false)<br> include_support = optional(bool, false)<br> include_tax = optional(bool, false)<br> include_upfront = optional(bool, false)<br> use_blended = optional(bool, false)<br> }), {<br> include_credit = false<br> include_discount = false<br> include_other_subscription = false<br> include_recurring = false<br> include_refund = false<br> include_subscription = true<br> include_support = false<br> include_tax = false<br> include_upfront = false<br> use_blended = false<br> })<br> }))</pre> | `[]` | no |
| <a name="input_create_sns_topic"></a> [create_sns_topic](#input_create_sns_topic) | A flag to determine if the SNS topic should be created | `bool` | `true` | no |
| <a name="input_notification"></a> [notification](#input_notification) | The configuration as to how the budget notifications should be sent | <pre>object({<br> email = optional(object({<br> addresses = list(string)<br> }), null)<br> slack = optional(object({<br> channel = string<br> lambda_name = optional(string, "budget-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_sns_topic_name"></a> [sns_topic_name](#input_sns_topic_name) | The name of the SNS topic to create for budget notifications | `string` | `"budget-notifications"` | no |
| <a name="input_tags"></a> [tags](#input_tags) | A map of tags to add to all resources | `map(string)` | `{}` | no |

## Outputs

No outputs.

<!-- END_TF_DOCS -->

```
Expand Down
2 changes: 1 addition & 1 deletion modules/budgets/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Provision the SNS topic for the budgets if required and notifications
module "notifications" {
source = "appvia/notifications/aws"
version = "0.1.1"
version = "0.1.3"

allowed_aws_services = [
"budgets.amazonaws.com",
Expand Down

0 comments on commit b7d5ec3

Please sign in to comment.