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_idoptional computed - string -
arnoptional computed - string -
budget_typerequired - string -
cost_filtersoptional computed - map from string to string -
idoptional computed - string -
limit_amountrequired - string -
limit_unitrequired - string -
nameoptional computed - string -
name_prefixoptional computed - string -
time_period_endoptional - string -
time_period_startrequired - string -
time_unitrequired - string -
cost_typeslist block-
include_creditoptional - bool -
include_discountoptional - bool -
include_other_subscriptionoptional - bool -
include_recurringoptional - bool -
include_refundoptional - bool -
include_subscriptionoptional - bool -
include_supportoptional - bool -
include_taxoptional - bool -
include_upfrontoptional - bool -
use_amortizedoptional - bool -
use_blendedoptional - bool
-
-
notificationset block-
comparison_operatorrequired - string -
notification_typerequired - string -
subscriber_email_addressesoptional - set of string -
subscriber_sns_topic_arnsoptional - set of string -
thresholdrequired - number -
threshold_typerequired - 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
-
NotificationsWithSubscribersoptional - List of NotificationWithSubscribers -
Budgetrequired - BudgetData
Explanation in CloudFormation Registry
The
AWS::Budgets::Budgetresource 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.