{"id":13839188,"url":"https://github.com/stefanfreitag/cdktf-budget-notifier","last_synced_at":"2025-07-11T00:32:18.525Z","repository":{"id":51139621,"uuid":"281453761","full_name":"stefanfreitag/cdktf-budget-notifier","owner":"stefanfreitag","description":"Construct for setting up billing alarms in AWS.","archived":true,"fork":false,"pushed_at":"2021-05-21T18:03:32.000Z","size":458,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-02-17T08:35:49.402Z","etag":null,"topics":["aws","cdk","cdktf","terraform"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefanfreitag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-21T16:50:00.000Z","updated_at":"2023-01-28T08:45:01.000Z","dependencies_parsed_at":"2022-08-28T22:12:17.049Z","dependency_job_id":null,"html_url":"https://github.com/stefanfreitag/cdktf-budget-notifier","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanfreitag%2Fcdktf-budget-notifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanfreitag%2Fcdktf-budget-notifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanfreitag%2Fcdktf-budget-notifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanfreitag%2Fcdktf-budget-notifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanfreitag","download_url":"https://codeload.github.com/stefanfreitag/cdktf-budget-notifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225669686,"owners_count":17505363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cdk","cdktf","terraform"],"created_at":"2024-08-04T16:00:53.516Z","updated_at":"2024-11-21T03:30:36.768Z","avatar_url":"https://github.com/stefanfreitag.png","language":"TypeScript","funding_links":[],"categories":["Examples"],"sub_categories":[],"readme":"# An AWS Budget notifier construct\n\nThe construct can be used to setup a billing alert in your AWS account.\nInternally it uses the cdktf and the construct library.\n\n## Prerequisites\n\n- Terraform CLI\n\n  ~~~sh\n  ❯ terraform -v\n  Terraform v0.13.5\n  ~~~\n\n- cdktf CLI\n\n  ~~~sh\n  ❯ cdktf --version\n   0.0.17\n  ~~~\n\n## Compiling and Synthesizing\n\n- Installing the required Terraform providers to `.gen\\providers`.\n\n  ~~~sh\n  ❯ npm run build\n\n  \u003e @stefanfreitag/cdktf-budget_notifier@0.1.0 build /home/stefan/Private/programmieren/aws/cdktf/budget_notifier\n  \u003e yarn get \u0026\u0026 tsc\n\n  yarn run v1.10.1\n  $ cdktf get\n  Generated typescript constructs in the output directory: .gen\n  Done in 5.84s.\n  ~~~\n\n- Executing the tests.\n\n  ~~~sh\n  ❯ npm run test\n  \n  \u003e @stefanfreitag/cdktf-budget_notifier@0.1.0 test /home/stefan/Private/programmieren/aws/cdktf/budget_notifier\n  \u003e jest\n\n   PASS  test/budget_notifier.test.ts\n  ✓ minimal configuration (8 ms)\n\n  Test Suites: 1 passed, 1 total\n  Tests:       1 passed, 1 total\n  Snapshots:   1 passed, 1 total\n  Time:        3.205 s, estimated 10 s\n  Ran all test suites\n  ~~~\n\n- Synthesizing the Terraform plan.\n\n  ~~~shell\n  ❯ cdktf synth --profile\n  Generated Terraform code in the output directory: cdktf.out\n  ~~~\n\n## Deploying example alarms\n\nThe construct can be used in a stack. A demo stack setting up two billing alarms is shown below:\n\n~~~sh\nconst app = new App();\n\nconst stack = new TerraformStack(app, \"BudgetAlarms_Stack\");\n\nnew AwsProvider(stack, \"aws\", {\n  region: \"eu-central-1\",\n  profile: \"cdk\"\n});\n\nnew BudgetNotifier(stack, \"BudgetAlarm_IT_Team_1\", {\n  limit: 25,\n  unit: \"USD\",\n  recipients: [\"john.doe@foo.bar\"],\n  threshold: 85,\n  application: \"helloWorld\",\n});\n\nnew BudgetNotifier(stack, \"BudgetAlarm_IT_Team_2\", {\n  limit: 1000,\n  unit: \"USD\",\n  recipients: [\"john@doe.com\"],\n  threshold: 70\n});\n\napp.synth();\n~~~\n\nThe stack is deployed\n\n~~~shell\n❯ cdktf deploy --profile cdk\nStack: budget_notifications_stack\nResources\n + AWS_BUDGETS_BUDGET   BudgetAlarmITTeam1_ aws_budgets_budget.budgetnotificationsstack_BudgetAlarmITTeam1_Test_4F9EDF62\n + AWS_BUDGETS_BUDGET   BudgetAlarmITTeam2_ aws_budgets_budget.budgetnotificationsstack_BudgetAlarmITTeam2_Test_C492B60F\n\nDiff: 2 to create, 0 to update, 0 to delete.\n\nDo you want to perform these actions?\n  CDK for Terraform will perform the actions described above.\n  Only 'yes' will be accepted to approve.\n\n  Enter a value:  \n~~~\n\n## Links\n\n- [Installing Terraform CLI](https://learn.hashicorp.com/tutorials/terraform/install-cli)\n- [Installing cdktf CLI](https://learn.hashicorp.com/tutorials/terraform/cdktf-install)\n- [CDK for Terraform](https://github.com/hashicorp/terraform-cdk)\n- [Creating a Billing Alarm to Monitor Your Estimated AWS Charges](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html)\n- [TagKeyValue Cost filter issue](https://github.com/terraform-providers/terraform-provider-aws/issues/5890)\n  ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanfreitag%2Fcdktf-budget-notifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanfreitag%2Fcdktf-budget-notifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanfreitag%2Fcdktf-budget-notifier/lists"}