Skip to content
This repository was archived by the owner on Mar 30, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Budget Alert
This building block will set up a budget alert for your account. You can easily define an amount, threshold, and the alert receiver emails to keep an eye on you cost.
This building block will set up a budget alert for your account. You can easily define an amount, threshold, and the alert receiver emails to keep an eye on your cost.

## Requirements
- You need a user with at least "AWSBudgetsActionsWithAWSResourceControlAccess" permission.
- "Access Key ID" and "Secret Access Key" for the authentication of the terraform provider
- "Access Key ID" and "Secret Access Key" for the authentication of the terraform provider and backend bucket
- Terraform backend file (see the next section)

**Note**: Please either generate your provider information and use it as an input, or uncomment provider configuration section in terraform.tf file

## Backend configuration
Here you can find an example of how to create a backend.tf file on this [Wiki Page](https://github.com/meshcloud/building-blocks/wiki/%5BUser-Guide%5D-Setting-up-the-Backend-for-terraform-state#how-to-configure-backendtf-file-for-these-providers)
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@


terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.31.0"
version = "> 5.3.0"
}
}
}

provider "aws" {
# Configuration options
}

# provider "aws" {

# }
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@ variable "amount" {

variable "actual_threshold" {
type = string
description = "The actual threshold to trigger the alert when it's reached"
description = "The actual threshold to trigger the alert when it's reached. e.g '90' for 90%"
}

variable "forecasted_threshold" {
type = string
description = "The forecasted threshold to trigger the alert when it's reached"
description = "The forecasted threshold to trigger the alert when it's reached. e.g '90' for 90%"
}

variable "contact_email" {
type = list(string)
description = "list of emails which should receive the budget alerts. e.g. ['devops@example.com']"
}

variable "aws_account_id" {
type = string
description = "The AWS Account ID. You can user 'Platform Tenant ID'"
}