Files
smom-dbis-138/terraform/modules/budget/main.tf
defiQUG 1fb7266469 Add Oracle Aggregator and CCIP Integration
- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control.
- Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities.
- Created .gitmodules to include OpenZeppelin contracts as a submodule.
- Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment.
- Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks.
- Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring.
- Created scripts for resource import and usage validation across non-US regions.
- Added tests for CCIP error handling and integration to ensure robust functionality.
- Included various new files and directories for the orchestration portal and deployment scripts.
2025-12-12 14:57:48 -08:00

91 lines
1.9 KiB
HCL

# Budget Module
# Creates Azure Consumption Budgets for cost management
variable "subscription_id" {
description = "Azure subscription ID"
type = string
}
variable "budget_name" {
description = "Name of the budget"
type = string
}
variable "amount" {
description = "Budget amount"
type = number
}
variable "time_grain" {
description = "Time grain (Monthly, Quarterly, Annually)"
type = string
default = "Monthly"
}
variable "start_date" {
description = "Budget start date (ISO 8601 format)"
type = string
}
variable "end_date" {
description = "Budget end date (ISO 8601 format)"
type = string
}
variable "notification_thresholds" {
description = "List of notification thresholds (0-100)"
type = list(number)
default = [50, 80, 100]
}
variable "contact_emails" {
description = "List of email addresses for notifications"
type = list(string)
default = []
}
variable "contact_roles" {
description = "List of contact roles for notifications"
type = list(string)
default = ["Owner", "Contributor"]
}
# Consumption Budget
resource "azurerm_consumption_budget_subscription" "main" {
name = var.budget_name
subscription_id = var.subscription_id
amount = var.amount
time_grain = var.time_grain
time_period {
start_date = var.start_date
end_date = var.end_date
}
# Notifications
dynamic "notification" {
for_each = var.notification_thresholds
content {
enabled = true
threshold = notification.value
operator = "GreaterThan"
threshold_type = "Actual"
contact_emails = var.contact_emails
contact_roles = var.contact_roles
}
}
}
# Outputs
output "budget_id" {
value = azurerm_consumption_budget_subscription.main.id
}
output "budget_name" {
value = azurerm_consumption_budget_subscription.main.name
}