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

budgets.tf#L1
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
main.tf#L3
resource "aws_budgets_budget" "cost" {
  name = "overall-cost-cap"
  budget_type = "COST"
  limit_amount = "20"
  limit_unit = "USD"
  time_unit = "MONTHLY"
budget.tf#L1
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"
budget.tf#L4
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"
budgets.tf#L1
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"

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

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

budget-notifications.yml#L82
    Type: "AWS::Budgets::Budget"
    Properties:
      Budget:
        BudgetLimit:
          Amount: !Sub ${BudgetLimit}
          Unit: !Sub ${Currency}
budget-notifications.yml#L82
    Type: "AWS::Budgets::Budget"
    Properties:
      Budget:
        BudgetLimit:
          Amount: !Sub ${BudgetLimit}
          Unit: !Sub ${Currency}
budget-notifications.yml#L82
    Type: "AWS::Budgets::Budget"
    Properties:
      Budget:
        BudgetLimit:
          Amount: !Sub ${BudgetLimit}
          Unit: !Sub ${Currency}
awsbudgets.yml#L76
    Type: "AWS::Budgets::Budget"
    Properties:
      Budget:
        BudgetLimit:
          Amount: !Sub ${BudgetLimit}
          Unit: !Sub ${Currency}
marbot-reserved-instance.yml#L200
    Type: 'AWS::Budgets::Budget'
    Properties:
      NotificationsWithSubscribers:
      - Subscribers:
        - SubscriptionType: SNS
          Address: !Ref Topic
BudgetStack.template.json#L4
        "Type": "AWS::Budgets::Budget",
        "Properties": {
          "Budget": {
            "BudgetLimit": {
              "Amount": 1,
              "Unit": "USD"
aws_budget.json#L4
    "path": "/PropertyTypes/AWS::Budgets::Budget.BudgetData/Properties/BudgetType/Value",
    "value": {
      "ValueType": "AWS::Budgets::Budget.BudgetType"
    }
  },
  {
aws_budget.json#L4
    "path": "/PropertyTypes/AWS::Budgets::Budget.BudgetData/Properties/BudgetType/Value",
    "value": {
      "ValueType": "AWS::Budgets::Budget.BudgetType"
    }
  },
  {
budgets.json#L34
            "Type": "AWS::Budgets::Budget",
            "Properties": {
                "Budget": {
                    "BudgetName": {
                        "Fn::Join": [
                            "",
budgetAlarm.json#L13
            "Type": "AWS::Budgets::Budget",
            "Properties": {
                "Budget": {
                    "BudgetName": "Cost Budget",
                    "BudgetType": "COST",
                    "BudgetLimit": {

Parameters

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, stelligent/cloudformation_templates and librannk/AWS-CloudFormation-tmplte source code examples are useful. See the CloudFormation Example section for further details.