Last active
September 20, 2025 21:52
-
-
Save Pelirrojo/e175230cdbdd1205f58f0cd98fcab42b to your computer and use it in GitHub Desktop.
Revisions
-
Pelirrojo revised this gist
Sep 20, 2025 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ # # Budgets & Limits for AWS Bedrock # https://github.com/evereven-tech/horizons-omnichat/blob/main/aws/13-budgets.tf # ############################################################################# terraform { -
Pelirrojo created this gist
Sep 20, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,110 @@ # # Budgets & Limits for AWS Bedrock # ############################################################################# terraform { required_version = "~> 1.10.5" required_providers { aws = { source = "hashicorp/aws" version = "6.11.0" } } backend "s3" {} } # Variables variable "budget_notification_emails" { description = "Email addresses for budget notifications" type = list(string) } variable "budget_notification_thresholds" { description = "Budget notification thresholds" type = list(number) } variable "platform_budget_limit" { description = "Platform budget limit" type = string } variable "marketplace_budget_limit" { description = "Marketplace budget limit" type = string } # Resources resource "aws_budgets_budget" "platform_cost" { name = "Platform-Cost-Budget" budget_type = "COST" time_unit = "MONTHLY" limit_amount = var.platform_budget_limit limit_unit = "USD" cost_filter { name = "BillingEntity" values = ["AWS"] } dynamic "notification" { for_each = var.budget_notification_thresholds content { comparison_operator = "GREATER_THAN" threshold_type = "PERCENTAGE" notification_type = "ACTUAL" threshold = notification.value subscriber_email_addresses = var.budget_notification_emails } } dynamic "notification" { for_each = var.budget_notification_thresholds content { comparison_operator = "GREATER_THAN" threshold_type = "PERCENTAGE" notification_type = "FORECASTED" threshold = notification.value subscriber_email_addresses = var.budget_notification_emails } } } resource "aws_budgets_budget" "marketplace_cost" { name = "Marketplace-External-Models-Budget" budget_type = "COST" time_unit = "MONTHLY" limit_amount = var.marketplace_budget_limit limit_unit = "USD" cost_filter { name = "BillingEntity" values = ["AWS Marketplace"] } dynamic "notification" { for_each = var.budget_notification_thresholds content { comparison_operator = "GREATER_THAN" threshold_type = "PERCENTAGE" notification_type = "ACTUAL" threshold = notification.value subscriber_email_addresses = var.budget_notification_emails } } dynamic "notification" { for_each = var.budget_notification_thresholds content { comparison_operator = "GREATER_THAN" threshold_type = "PERCENTAGE" notification_type = "FORECASTED" threshold = notification.value subscriber_email_addresses = var.budget_notification_emails } } }