Skip to content

Commit

Permalink
Ignore tfstate
Browse files Browse the repository at this point in the history
  • Loading branch information
dpritchett-rebellion committed May 31, 2021
0 parents commit 9021f3c
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.terraform
terraform.tfstate*
21 changes: 21 additions & 0 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
locals {
max_monthly_spend = "10"
currency = "USD"
admin_email = "[email protected]"
}

resource "aws_budgets_budget" "max_monthly_spend" {
name = "Max Monthly AWS Spend"
budget_type = "COST"
limit_amount = local.max_monthly_spend
limit_unit = local.currency
time_unit = "MONTHLY"
time_period_start = "2021-05-31_00:00"

notification {
comparison_operator = "GREATER_THAN"
threshold = "100"
threshold_type = "PERCENTAGE"
notification_type = "FORECASTED"
subscriber_email_addresses = [local.admin_email]
}

notification {
comparison_operator = "GREATER_THAN"
threshold = "100"
threshold_type = "PERCENTAGE"
notification_type = "ACTUAL"
subscriber_email_addresses = [local.admin_email]
}
}

terraform {
required_version = "~> 0.15.4"

required_providers {
aws = {
source = "hashicorp/aws"
version = "3.42.0"
}
}
}

provider "aws" {
region = "us-east-1"
}

0 comments on commit 9021f3c

Please sign in to comment.