AWS Budgets Budget
This page shows how to write Terraform and CloudFormation for AWS Budgets Budget and write them securely.
aws_budgets_budget (Terraform)
The Budget in AWS Budgets can be configured in Terraform with the resource name aws_budgets_budget
. The following sections describe 5 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_budgets_budget" "actual_cost_budget" {
count = var.enable_actual_cost_budget ? 1 : 0
name = var.actual_cost_budget_name
budget_type = "COST"
limit_amount = var.limit_amount
resource "aws_budgets_budget" "cost" {
name = "overall-cost-cap"
budget_type = "COST"
limit_amount = "20"
limit_unit = "USD"
time_unit = "MONTHLY"
resource "aws_budgets_budget" "EC2" {
name = "Monthly EC2 Budget"
budget_type = "COST"
limit_amount = var.ec2_limit_amount
limit_unit = "USD"
time_period_end = "2087-05-11_00:00"
resource "aws_budgets_budget" "budget_total" {
name = "rg-tf-budget-total-monthly"
budget_type = "COST"
limit_amount = "60"
limit_unit = "USD"
time_period_start = "2018-01-01_00:00"
resource "aws_budgets_budget" "overall-budget-100-actual" {
name = "budget-monthly-100-actual"
budget_type = "COST"
limit_amount = "100"
limit_unit = "USD"
time_period_start = "2020-01-01_00:00"
Parameters
-
account_id
optional computed - string -
arn
optional computed - string -
budget_type
required - string -
cost_filters
optional computed - map from string to string -
id
optional computed - string -
limit_amount
required - string -
limit_unit
required - string -
name
optional computed - string -
name_prefix
optional computed - string -
time_period_end
optional - string -
time_period_start
required - string -
time_unit
required - string -
cost_types
list block-
include_credit
optional - bool -
include_discount
optional - bool -
include_other_subscription
optional - bool -
include_recurring
optional - bool -
include_refund
optional - bool -
include_subscription
optional - bool -
include_support
optional - bool -
include_tax
optional - bool -
include_upfront
optional - bool -
use_amortized
optional - bool -
use_blended
optional - bool
-
-
notification
set block-
comparison_operator
required - string -
notification_type
required - string -
subscriber_email_addresses
optional - set of string -
subscriber_sns_topic_arns
optional - set of string -
threshold
required - number -
threshold_type
required - string
-
Explanation in Terraform Registry
Provides a budgets budget resource. Budgets use the cost visualisation provided by Cost Explorer to show you the status of your budgets, to provide forecasts of your estimated costs, and to track your AWS usage, including your free tier usage.
AWS::Budgets::Budget (CloudFormation)
The Budget in Budgets can be configured in CloudFormation with the resource name AWS::Budgets::Budget
. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
Type: "AWS::Budgets::Budget"
Properties:
Budget:
BudgetLimit:
Amount: !Sub ${BudgetLimit}
Unit: !Sub ${Currency}
Type: "AWS::Budgets::Budget"
Properties:
Budget:
BudgetLimit:
Amount: !Sub ${BudgetLimit}
Unit: !Sub ${Currency}
Type: "AWS::Budgets::Budget"
Properties:
Budget:
BudgetLimit:
Amount: !Sub ${BudgetLimit}
Unit: !Sub ${Currency}
Type: "AWS::Budgets::Budget"
Properties:
Budget:
BudgetLimit:
Amount: !Sub ${BudgetLimit}
Unit: !Sub ${Currency}
Type: 'AWS::Budgets::Budget'
Properties:
NotificationsWithSubscribers:
- Subscribers:
- SubscriptionType: SNS
Address: !Ref Topic
"path": "/PropertyTypes/AWS::Budgets::Budget.BudgetData/Properties/BudgetType/Value",
"value": {
"ValueType": "AWS::Budgets::Budget.BudgetType"
}
},
{
"Type": "AWS::Budgets::Budget",
"Properties": {
"Budget": {
"BudgetLimit": {
"Amount": 1,
"Unit": "USD"
"path": "/PropertyTypes/AWS::Budgets::Budget.BudgetData/Properties/BudgetType/Value",
"value": {
"ValueType": "AWS::Budgets::Budget.BudgetType"
}
},
{
"Type": "AWS::Budgets::Budget",
"Properties": {
"Budget": {
"BudgetName": {
"Fn::Join": [
"",
"Type": "AWS::Budgets::Budget",
"Properties": {
"Budget": {
"BudgetName": "Cost Budget",
"BudgetType": "COST",
"BudgetLimit": {
Parameters
-
NotificationsWithSubscribers
optional - List of NotificationWithSubscribers -
Budget
required - BudgetData
Explanation in CloudFormation Registry
The
AWS::Budgets::Budget
resource allows customers to take pre-defined actions that will trigger once a budget threshold has been exceeded. creates, replaces, or deletes budgets for Billing and Cost Management. For more information, see Managing Your Costs with Budgets in the AWS Billing and Cost Management User Guide.
Frequently asked questions
What is AWS Budgets Budget?
AWS Budgets Budget is a resource for Budgets of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS Budgets Budget?
For Terraform, the cmdlabs/cmd-tf-aws-budgets, petersiemen/cross-account-multi-region-ci-cd-pipeline-on-aws and JPurcell1994/newrelic-terraform-modules source code examples are useful. See the Terraform Example section for further details.
For CloudFormation, the TanAlex/cfn_templates, librannk/AWS-CloudFormation-tmplte and stelligent/cloudformation_templates source code examples are useful. See the CloudFormation Example section for further details.