Terraform module - creates a Budget and a Budget for half as much.
It's 100% Open Source and licensed under the APACHE2.
These are just basic examples, your budget rules should be much more sophisticated.
Include this repository as a module in your existing terraform code:
module "budget" {
source = "JamesWoolfenden/budget/aws"
version = "0.3.32"
limit = var.limit
time_period_start = var.time_period_start
budget = var.budget
notification = var.notification
}
The module reference uses 2 objects, budget and notification, from the example data. This module implements billing alerts on your AWS account, the provided variables are in examplea.auto.tfvars:
budget={
name = "budget-ec2-monthly"
budget_type = "COST"
time_unit = "MONTHLY"
limit_unit = "Pounds"
}
notification={
comparison_operator = "GREATER_THAN"
threshold = 100
threshold_type = "PERCENTAGE"
notification_type = "FORECASTED"
subscriber_email_addresses = ["[email protected]"]
subscriber_sns_topic_arns = [""]
}
The variable limit creates 2 sets of alerts one at its setting and another at half. Additional users or groups can added to subscriber_email_addresses.
No requirements.
Name | Version |
---|---|
aws | n/a |
No modules.
Name | Type |
---|---|
aws_budgets_budget.budget | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
budget | Basic Budget Properties | map(any) |
{ |
no |
cost_filters | The Budget filters to use | map(any) |
null |
no |
half_budget_enabled | Whether to enable or disable the half budget alert | bool |
true |
no |
limit | Budget alarm limit | number |
n/a | yes |
notification | Budget notification properties | object({ |
n/a | yes |
time_period_start | Time to start | string |
n/a | yes |
Name | Description |
---|---|
budget | n/a |
half_budget | n/a |
Check out these related projects.
- terraform-aws-s3 - S3 buckets
Got a question?
File a GitHub issue.
Please use the issue tracker to report any bugs or file feature requests.
Copyright © 2019-2022 James Woolfenden
See LICENSE for full details.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.