Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: AWS Budgets #753

Closed
hashibot opened this issue Jun 13, 2017 · 9 comments
Closed

Feature Request: AWS Budgets #753

hashibot opened this issue Jun 13, 2017 · 9 comments
Labels
new-resource Introduces a new resource. service/budgets Issues and PRs that pertain to the budgets service.
Milestone

Comments

@hashibot
Copy link

This issue was originally opened by @Stephan1984 as hashicorp/terraform#14313. It was migrated here as part of the provider split. The original body of the issue is below.


Hi there,

would be nice, to create AWS Budgets via terraform to monitor costs and resource usage. This is possible via API since Oct 20, 2016: https://aws.amazon.com/de/about-aws/whats-new/2016/10/new-aws-budgets-features-include-api-access-usage-based-budgets-and-more/

API Reference: http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/operations.html

Kind regards
Stephan

@hashibot hashibot added enhancement Requests to existing resources that expand the functionality or scope. new-resource Introduces a new resource. labels Jun 13, 2017
@netflash
Copy link

netflash commented Sep 7, 2017

I've attached the service list in the same form AWS has them in JSON, e.g.

...
    "CostFilters": {
        "Service": [
            "AWS CloudTrail"
        ]
    }
...

The advantage of having this list - service names

  • are not documented and
  • not consistent across services - some of them have spaces in names, some don't, etc
Amazon AppStream
Amazon Athena
Amazon Chime
Amazon Cloud Directory
Amazon CloudFront
Amazon CloudSearch
Amazon Cognito
Amazon Cognito Sync
Amazon Connect
Amazon DynamoDB
Amazon EC2 Container Registry (ECR)
Amazon Elastic Compute Cloud
Amazon Elastic File System
Amazon Elastic MapReduce
Amazon Elastic Transcoder
Amazon ElastiCache
Amazon Elasticsearch Service
Amazon GameLift
Amazon Glacier
Amazon Inspector
Amazon Kinesis
Amazon Kinesis Analytics
Amazon Kinesis Firehose
Amazon Lex
Amazon Lightsail
Amazon Machine Learning
Amazon Mobile Analytics
Amazon Pinpoint
Amazon Polly
Amazon QuickSight
Amazon RDS Service
Amazon Redshift
Amazon Rekognition
Amazon Route 53
Amazon Simple Email Service
Amazon Simple Notification Service
Amazon Simple Queue Service
Amazon Simple Storage Service
Amazon Simple Workflow Service
Amazon SimpleDB
Amazon Virtual Private Cloud
Amazon WorkDocs
Amazon WorkSpaces
Amazon WorkSpaces Application Manager
Amazon Zocalo
AmazonCloudWatch
AmazonWorkMail
AWS Budgets
AWS CloudHSM
AWS CloudTrail
AWS CodeCommit
AWS CodeDeploy
AWS CodePipeline
AWS Config
AWS Data Pipeline
AWS Database Migration Service
AWS Device Farm
AWS Direct Connect
AWS Directory Service
AWS Greengrass
AWS Import/Export
AWS Import/Export Snowball
AWS IoT
AWS Key Management Service
AWS Lambda
AWS OpsWorks
AWS Service Catalog
AWS Shield
AWS Snowball Extra Days
AWS Step Functions
AWS Storage Gateway
AWS WAF
AWS X-Ray
CloudWatch Events
CodeBuild

@StyleT
Copy link

StyleT commented Sep 26, 2017

Any news here? :) I would say that this feature is crucial if you have enterprise scale AWS infrastructure.

xchapter7x added a commit to xchapter7x/terraform-provider-aws that referenced this issue Oct 13, 2017
radeksimko pushed a commit that referenced this issue Oct 15, 2017
* add vendoring for aws service budget

[#753]

* bump aws budgets package vendor version
@StyleT
Copy link

StyleT commented Oct 18, 2017

@xchapter7x Hey! I see that you've started working on this. Looking forward to see it in nearest release! Nice job 😎

@xchapter7x
Copy link
Contributor

@StyleT thanks.
The PR (#1879) is just waiting on review/feedback from the hashicorp team.
Hope it adds value for the community :)

xchapter7x added a commit to xchapter7x/terraform-provider-aws that referenced this issue Dec 16, 2017
xchapter7x added a commit to xchapter7x/terraform-provider-aws that referenced this issue Dec 16, 2017
xchapter7x added a commit to xchapter7x/terraform-provider-aws that referenced this issue Dec 16, 2017
xchapter7x added a commit to xchapter7x/terraform-provider-aws that referenced this issue Dec 16, 2017
@radeksimko radeksimko added service/budgets Issues and PRs that pertain to the budgets service. and removed enhancement Requests to existing resources that expand the functionality or scope. labels Jan 22, 2018
xchapter7x added a commit to xchapter7x/terraform-provider-aws that referenced this issue Mar 31, 2018
xchapter7x added a commit to xchapter7x/terraform-provider-aws that referenced this issue Mar 31, 2018
xchapter7x added a commit to xchapter7x/terraform-provider-aws that referenced this issue Mar 31, 2018
xchapter7x added a commit to xchapter7x/terraform-provider-aws that referenced this issue Mar 31, 2018
fmasuhr pushed a commit to babbel/terraform-provider-aws that referenced this issue Apr 24, 2018
basic create budget functionality

[hashicorp#753]

use human readable date format and descriptive field names

[hashicorp#753]

add cost filters to budget resource

[hashicorp#753]

delete budget on resource destroy

[hashicorp#753]

fix go vet errors

update and read a aws budget from the resource

handle read of non-existent budget gracefully

employ functions to remove duplication and clarify intent

reuse existing method for budget existence check

Added documentation for aws_budget resource. (#1)

hi @nicksantamaria ,
thanks for the contribution and the helpful feedback on this PR.

support full set of budget costtypes

use default for budget time period end

check proper creation of budget time period

enable use of budget name_prefix as alternative to budget name

update defaults budget values and documentation

dry up budget test configs

create test budget with end date which is always in the future

align max budget end date with aws api max

employ naming convention of aws service + resource

  - this is so we can keep resources grouped

  pr feedback:
  (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r172539673)

align filename with service + resource naming

  pr feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r172539673)

remove un-needed verbosity in object definition

  pr feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r172576462)

remove deprecated call to Set in AWS budgets SDK

  PR Feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r172561258)

check for errors on budget read and obey demeter

  PR Feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r172580699)

flatten budget and checks uses separate function

  PR Feedback:
  (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r172580699)

swap use of Set for struct init with value

  PR Feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r172561258)

add cost_types attr to align with aws budget api

  PR Feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r172566294)

accurate documentation of budget resource

  PR Feedback:
  - https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r172568560
  - https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r172569165
  - https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r172577391
  - https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r172569549

remove extraneous functions from budgets resource

adhere function names in budgets to conventions

inline test check rather than separate function

  PR Feedback:
  (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r172570851)

unmarshal costtypes as separate function

configure optional account_id for budget

  - includes documentation updates for supported import changes

  PR Feedback:
  (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r172560437)

account_id in budget resource docs

use inline schema definition for budgets budget

  PR Feedback:
  (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r176823677)

use aws string helper to create pointers

  PR Feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r176824529)

compute name and name prefix for budgets budget

  PR Feedback:
  (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r176828112)

emit warning when budget is not found

  PR Feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r176828446)

call read after create budgets budget

  PR Feedback:
  (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r176824910)
  (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r176825249)

remove redundant call on resource delete

  PR Feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r176825987)

define budget name on create only

  PR Feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r176827787)

correct name for budgets budget tests

 PR Feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r178949969)

reorder test cases for budgets

  PR Feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r178956591)

align test config function names to convention

  PR Feedback:
  (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r178956192)

adjust documentations to match nameing convention

reorder and remove dups from attributes in docs

  PR Feedback:
  (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r178957219)

remove custom flat budget test struct

  - in favor of budgets.Budget

  PR Feedback:
  (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r178955760)

apply naming convention to all test functions

use resources list to cleanup test budgets

  PR Feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r178953821)

conform budgetdestroy signature to testdestroy

rework function signature for exists check

  PR Feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r178951991)
@vrumiantsev
Copy link

Hi Guys, do we have any preliminary date when we expect this implementation? Really need it :)

@bflad bflad added this to the v1.17.0 milestone Apr 30, 2018
@bflad
Copy link
Contributor

bflad commented Apr 30, 2018

The new aws_bugdets_budget resource has been merged in via #1879 and will release with v1.17.0 of the AWS provider in about two days.

@bflad bflad closed this as completed Apr 30, 2018
@bflad
Copy link
Contributor

bflad commented May 2, 2018

This has been released in version 1.17.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@afeld
Copy link
Contributor

afeld commented May 16, 2018

Issue around Budget notifications: #4548

@ghost
Copy link

ghost commented Apr 6, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-resource Introduces a new resource. service/budgets Issues and PRs that pertain to the budgets service.
Projects
None yet
Development

No branches or pull requests

8 participants