budget_name
Name of the created AWS Budget as created in the AWS account. Use this for API calls and CLI commands.
The name of the AWS Budget as created in the AWS account. Use this for API calls and CLI commands.
Example Value
monthly-spend-limit
Common Use Cases
AWS CLI Commands
# View budget details
aws budgets describe-budget \
--account-id 123456789012 \
--budget-name $(terraform output -raw budget_name)
# Get budget history
aws budgets describe-budget-performance-history \
--account-id 123456789012 \
--budget-name $(terraform output -raw budget_name)
CloudWatch Dashboard Widget
resource "aws_cloudwatch_dashboard" "costs" {
dashboard_name = "cost-overview"
dashboard_body = jsonencode({
widgets = [{
type = "text"
properties = {
markdown = "## Budget: ${module.budget.budget_name}"
}
}]
})
}
Automation Scripts
output "budget_info" {
description = "Budget information for automation"
value = {
name = module.budget.budget_name
arn = module.budget.budget_arn
}
}
Usage
module "cost_controls" {
source = "registry.patterneddesigns.ca/governance/cost-controls/aws"
version = "0.1.0"
# ... inputs
}
# Access this output
output "budget_name" {
value = module.cost_controls.budget_name
}