diff --git a/modules/budgets/README.md b/modules/budgets/README.md index ed85fa8..944f5cf 100644 --- a/modules/budgets/README.md +++ b/modules/budgets/README.md @@ -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 .` + ## Requirements -| Name | Version | -|------|---------| -| [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | ~> 5.0 | +| Name | Version | +| ------------------------------------------------------------------------ | ------- | +| [terraform](#requirement_terraform) | >= 1.0 | +| [aws](#requirement_aws) | ~> 5.0 | ## Providers -| Name | Version | -|------|---------| -| [aws](#provider\_aws) | 5.39.1 | +| Name | Version | +| ------------------------------------------------ | ------- | +| [aws](#provider_aws) | 5.39.1 | ## Modules -| Name | Source | Version | -|------|--------|---------| -| [notifications](#module\_notifications) | terraform-aws-modules/sns/aws | v6.0.1 | -| [slack](#module\_slack) | terraform-aws-modules/notify-slack/aws | 6.1.1 | +| Name | Source | Version | +| -------------------------------------------------------------------------- | -------------------------------------- | ------- | +| [notifications](#module_notifications) | terraform-aws-modules/sns/aws | v6.0.1 | +| [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 | -|------|-------------|------|---------|:--------:| -| [budgets](#input\_budgets) | A collection of budgets to provision |
list(object({
name = string
budget_type = optional(string, "COST")
limit_amount = optional(string, "100.0")
limit_unit = optional(string, "PERCENTAGE")
time_unit = optional(string, "MONTHLY")

notification = optional(object({
comparison_operator = string
threshold = number
threshold_type = string
notification_type = string
}), null)

auto_adjust_data = optional(list(object({
auto_adjust_type = string
})), [])

cost_filter = optional(list(object({
name = string
values = list(string)
})), [])

cost_types = optional(object({
include_credit = optional(bool, false)
include_discount = optional(bool, false)
include_other_subscription = optional(bool, false)
include_recurring = optional(bool, false)
include_refund = optional(bool, false)
include_subscription = optional(bool, false)
include_support = optional(bool, false)
include_tax = optional(bool, false)
include_upfront = optional(bool, false)
use_blended = optional(bool, false)
}), {
include_credit = false
include_discount = false
include_other_subscription = false
include_recurring = false
include_refund = false
include_subscription = true
include_support = false
include_tax = false
include_upfront = false
use_blended = false
})
}))
| `[]` | no | -| [create\_sns\_topic](#input\_create\_sns\_topic) | A flag to determine if the SNS topic should be created | `bool` | `true` | no | -| [notification](#input\_notification) | The configuration as to how the budget notifications should be sent |
object({
email = optional(object({
addresses = list(string)
}), null)
slack = optional(object({
channel = string
lambda_name = optional(string, "budget-notifications")
webhook_url = string
}), null)
teams = optional(object({
webhook_url = string
}), null)
})
| n/a | yes | -| [sns\_topic\_name](#input\_sns\_topic\_name) | The name of the SNS topic to create for budget notifications | `string` | `"budget-notifications"` | no | -| [tags](#input\_tags) | A map of tags to add to all resources | `map(string)` | `{}` | no | +| Name | Description | Type | Default | Required | +| --------------------------------------------------------------------------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | :------: | +| [budgets](#input_budgets) | A collection of budgets to provision |
list(object({
name = string
budget_type = optional(string, "COST")
limit_amount = optional(string, "100.0")
limit_unit = optional(string, "PERCENTAGE")
time_unit = optional(string, "MONTHLY")

notification = optional(object({
comparison_operator = string
threshold = number
threshold_type = string
notification_type = string
}), null)

auto_adjust_data = optional(list(object({
auto_adjust_type = string
})), [])

cost_filter = optional(list(object({
name = string
values = list(string)
})), [])

cost_types = optional(object({
include_credit = optional(bool, false)
include_discount = optional(bool, false)
include_other_subscription = optional(bool, false)
include_recurring = optional(bool, false)
include_refund = optional(bool, false)
include_subscription = optional(bool, false)
include_support = optional(bool, false)
include_tax = optional(bool, false)
include_upfront = optional(bool, false)
use_blended = optional(bool, false)
}), {
include_credit = false
include_discount = false
include_other_subscription = false
include_recurring = false
include_refund = false
include_subscription = true
include_support = false
include_tax = false
include_upfront = false
use_blended = false
})
}))
| `[]` | no | +| [create_sns_topic](#input_create_sns_topic) | A flag to determine if the SNS topic should be created | `bool` | `true` | no | +| [notification](#input_notification) | The configuration as to how the budget notifications should be sent |
object({
email = optional(object({
addresses = list(string)
}), null)
slack = optional(object({
channel = string
lambda_name = optional(string, "budget-notifications")
webhook_url = string
}), null)
teams = optional(object({
webhook_url = string
}), null)
})
| n/a | yes | +| [sns_topic_name](#input_sns_topic_name) | The name of the SNS topic to create for budget notifications | `string` | `"budget-notifications"` | no | +| [tags](#input_tags) | A map of tags to add to all resources | `map(string)` | `{}` | no | ## Outputs No outputs. + ``` diff --git a/modules/budgets/main.tf b/modules/budgets/main.tf index db9f6d7..85db9e2 100644 --- a/modules/budgets/main.tf +++ b/modules/budgets/main.tf @@ -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",