https://github.com/geekcell/terraform-aws-budgets
Terraform module to provision an AWS Budgets.
https://github.com/geekcell/terraform-aws-budgets
aws budgets terraform terraform-module
Last synced: 7 months ago
JSON representation
Terraform module to provision an AWS Budgets.
- Host: GitHub
- URL: https://github.com/geekcell/terraform-aws-budgets
- Owner: geekcell
- License: apache-2.0
- Created: 2023-02-07T15:13:14.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-23T15:31:44.000Z (over 1 year ago)
- Last Synced: 2025-03-01T18:48:52.011Z (7 months ago)
- Topics: aws, budgets, terraform, terraform-module
- Language: HCL
- Homepage: https://www.geekcell.io
- Size: 77.1 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.geekcell.io/)
### Code Quality
[](https://github.com/geekcell/terraform-aws-budgets/blob/master/LICENSE)
[](https://github.com/geekcell/terraform-aws-budgets/releases)
[](https://github.com/geekcell/terraform-aws-budgets/actions/workflows/release.yaml)
[](https://github.com/geekcell/terraform-aws-budgets/actions/workflows/validate.yaml)
[](https://github.com/geekcell/terraform-aws-budgets/actions/workflows/linter.yaml)# Terraform AWS Budgets
This Terraform module provides a preconfigured solution for setting up
AWS Budgets for your AWS account. Our team has years of experience working
with AWS Budgets, and we are sharing our knowledge with you through this
module. With this module, you can quickly and easily set up budgets that
align with your organization's goals and get alerts when your usage exceeds
your specified limits. By using this module, you can save time and avoid
common mistakes when setting up AWS Budgets.Not only is this module easy to configure, but it also encapsulates
everything you need in one place. You can simply use the module and be
confident that everything has been set up correctly and efficiently.This makes it an excellent choice for organizations of any size looking
to effectively manage their AWS costs.## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [budgets](#input\_budgets) | The list of budget. |list(object({|
name = string
budget_type = string
limit_amount = string
limit_unit = string
time_period_start = string
time_period_end = string
time_unit = string
cost_filter = optional(map(list(string)))
notification = object({
comparison_operator = string
threshold = string
threshold_type = string
notification_type = string
})
}))[| no |
{
"budget_type": "COST",
"limit_amount": "200",
"limit_unit": "USD",
"name": "budget-account-monthly",
"notification": {
"comparison_operator": "GREATER_THAN",
"notification_type": "FORECASTED",
"threshold": "100",
"threshold_type": "PERCENTAGE"
},
"time_period_end": "2087-06-15_00:00",
"time_period_start": "2023-01-01_00:00",
"time_unit": "MONTHLY"
}
]
| [name](#input\_name) | The name of the budget. | `string` | n/a | yes |
| [recipients](#input\_recipients) | The email addresses to send notifications to. | `list(string)` | n/a | yes |## Outputs
No outputs.
## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | >= 4.4 |## Resources
- resource.aws_budgets_budget.main (main.tf#19)
- data source.aws_caller_identity.current (data.tf#1)# Examples
### Basic Example
```hcl
module "basic-example" {
source = "../../"
name = var.namerecipients = var.recipients
budgets = [
{
name = var.namebudget_type = "COST"
limit_amount = var.amount
limit_unit = var.amount_unittime_period_start = "2023-01-01_00:00"
time_period_end = "2087-06-15_00:00"
time_unit = "MONTHLY"notification = {
comparison_operator = "GREATER_THAN"
threshold = "80"
threshold_type = "PERCENTAGE"
notification_type = "FORECASTED"
}
}
]
}
```### Advanced Example
```hcl
module "advanced-example" {
source = "../../"
name = "my-budget"budgets = [
{
name = "ec2-rds-monthly-in-eu-central-1"
budget_type = "COST"
limit_amount = "200"
limit_unit = "USD"
time_period_start = "2023-01-01_00:00"
time_period_end = "2087-06-15_00:00"
time_unit = "MONTHLY"cost_filter = {
"Service" = [
"Amazon Elastic Compute Cloud - Compute",
"Amazon Relational Database Service"
]
"Region" = [
"eu-central-1"
]
}notification = {
comparison_operator = "GREATER_THAN"
threshold = "80"
threshold_type = "PERCENTAGE"
notification_type = "FORECASTED"
}
}
]recipients = ["no-reply@example.org"]
}
```