Skip to content

Commit

Permalink
Replace azurerm_consumption_budget_resource_group for a azurerm_consu…
Browse files Browse the repository at this point in the history
…mption_budget_subscription to track all costs
  • Loading branch information
GeorgianaElena committed Jul 23, 2024
1 parent f632ed6 commit 5dd268a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions terraform/azure/budget-alerts.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
resource "azurerm_consumption_budget_resource_group" "budget" {
name = "BudgetResourceGroup"
resource_group_id = azurerm_resource_group.jupyterhub.id
data "azurerm_subscription" "current" {}
resource "azurerm_consumption_budget_subscription" "budget" {
name = "BudgetSubscription"
subscription_id = data.azurerm_subscription.current.id

amount = var.budget_alert_amount
time_grain = "Monthly"
Expand Down
4 changes: 2 additions & 2 deletions terraform/azure/projects/pchub.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ global_storage_account_name = "2i2cpchub"
location = "westeurope"

budget_alert_enabled = true
# This is the average of total costs for Jun 2024 +20% in USD
budget_alert_amount = "600"
# This is approximate total cost for Jun 2024 in USD
budget_alert_amount = "500"

storage_size = 100
ssh_pub_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDEswiqOZ3cdu+OaT1K3ay8brlnnoHIpDyKNfLGeRAFQ4ZP+1OD82CIwrUiU4GhmiKTyyN9DWuKKhbEjMIrAKnoybQZBk/x21sHLyrqit1wq/X+f7/SKqDTFQGFYO5cERl/MwMRIp5WHEcLXi6WnaRczCQxOW6J36V5/frynz2Qq/3XwhQnkW9401HYt9H4Ur6JTZC0G0hMVklIT+gGsIml6Qu2O8+iuA2saGn3SCmTs7WBxVsEQTFt1w6JoJi4ohi7RtlT9QDSx4J+cawBNqzAK+gkozj2lN5Yiq7gtPJMe8sdLqmg9vSPCuAMMZeP+DhEGbre7Y+MMplSJrqkeT61WeCl39ffqwievGFkdTxzCiqX9TKSR2SS98W6jpCYrSkA1ymzn+HUADfyszU7sn6/F9I2w8oUbuFfMKDD4XfgkdK7Jqew7YJ4CDK2f4D94MWAmFicVKsYXPautnk+d3JqXarUN7k8bF9On2N8xZln0Zsui/Pmj1jQsnm0KXZOb9k= [email protected]"
Expand Down

0 comments on commit 5dd268a

Please sign in to comment.