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

Add auto-adjust feature to aws_budget #27474

Merged
merged 24 commits into from
Oct 28, 2022
Merged

Add auto-adjust feature to aws_budget #27474

merged 24 commits into from
Oct 28, 2022

Conversation

breathingdust
Copy link
Member

@breathingdust breathingdust commented Oct 26, 2022

Description

Adds the auto_adjust_data configuration block to the aws_budgets_budget resource.

Relations

Closes #23268.
Closes #25766.
Closes #16798.

Output from Acceptance Testing

make testacc TESTARGS='-run=TestAccBudgetsBudget_' PKG=budgets

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/budgets/... -v -count 1 -parallel 20  -run=TestAccBudgetsBudget_ -timeout 180m
=== RUN   TestAccBudgetsBudget_basic
=== PAUSE TestAccBudgetsBudget_basic
=== RUN   TestAccBudgetsBudget_Name_generated
=== PAUSE TestAccBudgetsBudget_Name_generated
=== RUN   TestAccBudgetsBudget_namePrefix
=== PAUSE TestAccBudgetsBudget_namePrefix
=== RUN   TestAccBudgetsBudget_disappears
=== PAUSE TestAccBudgetsBudget_disappears
=== RUN   TestAccBudgetsBudget_autoAdjustDataForecast
=== PAUSE TestAccBudgetsBudget_autoAdjustDataForecast
=== RUN   TestAccBudgetsBudget_autoAdjustDataHistorical
=== PAUSE TestAccBudgetsBudget_autoAdjustDataHistorical
=== RUN   TestAccBudgetsBudget_costTypes
=== PAUSE TestAccBudgetsBudget_costTypes
=== RUN   TestAccBudgetsBudget_notifications
=== PAUSE TestAccBudgetsBudget_notifications
=== CONT  TestAccBudgetsBudget_basic
=== CONT  TestAccBudgetsBudget_autoAdjustDataForecast
=== CONT  TestAccBudgetsBudget_namePrefix
=== CONT  TestAccBudgetsBudget_disappears
=== CONT  TestAccBudgetsBudget_costTypes
=== CONT  TestAccBudgetsBudget_notifications
=== CONT  TestAccBudgetsBudget_Name_generated
=== CONT  TestAccBudgetsBudget_autoAdjustDataHistorical
--- PASS: TestAccBudgetsBudget_disappears (32.26s)
--- PASS: TestAccBudgetsBudget_Name_generated (42.23s)
--- PASS: TestAccBudgetsBudget_namePrefix (42.58s)
--- PASS: TestAccBudgetsBudget_autoAdjustDataForecast (42.77s)
--- PASS: TestAccBudgetsBudget_basic (42.78s)
--- PASS: TestAccBudgetsBudget_costTypes (64.84s)
--- PASS: TestAccBudgetsBudget_autoAdjustDataHistorical (64.99s)
--- PASS: TestAccBudgetsBudget_notifications (70.88s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/budgets    75.159s

...

@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added service/budgets Issues and PRs that pertain to the budgets service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/L Managed by automation to categorize the size of a PR. and removed tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/budgets Issues and PRs that pertain to the budgets service. labels Oct 26, 2022
@github-actions github-actions bot added service/budgets Issues and PRs that pertain to the budgets service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Oct 26, 2022
@breathingdust breathingdust marked this pull request as ready for review October 26, 2022 01:25
ewbankkit and others added 5 commits October 26, 2022 15:03
…#15090).

Acceptance test output:

% make testacc TESTARGS='-run=TestAccBudgetsBudgetAction_' PKG=budgets ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/budgets/... -v -count 1 -parallel 2  -run=TestAccBudgetsBudgetAction_ -timeout 180m
=== RUN   TestAccBudgetsBudgetAction_basic
=== PAUSE TestAccBudgetsBudgetAction_basic
=== RUN   TestAccBudgetsBudgetAction_disappears
=== PAUSE TestAccBudgetsBudgetAction_disappears
=== CONT  TestAccBudgetsBudgetAction_basic
=== CONT  TestAccBudgetsBudgetAction_disappears
--- PASS: TestAccBudgetsBudgetAction_disappears (25.10s)
--- PASS: TestAccBudgetsBudgetAction_basic (35.33s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/budgets	39.355s
@github-actions github-actions bot added the documentation Introduces or discusses updates to documentation. label Oct 27, 2022
Acceptance test output:

% make testacc TESTARGS='-run=TestAccBudgetsBudget_' PKG=budgets ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/budgets/... -v -count 1 -parallel 2  -run=TestAccBudgetsBudget_ -timeout 180m
=== RUN   TestAccBudgetsBudget_basic
=== PAUSE TestAccBudgetsBudget_basic
=== RUN   TestAccBudgetsBudget_Name_generated
=== PAUSE TestAccBudgetsBudget_Name_generated
=== RUN   TestAccBudgetsBudget_namePrefix
=== PAUSE TestAccBudgetsBudget_namePrefix
=== RUN   TestAccBudgetsBudget_disappears
=== PAUSE TestAccBudgetsBudget_disappears
=== RUN   TestAccBudgetsBudget_autoAdjustDataForecast
=== PAUSE TestAccBudgetsBudget_autoAdjustDataForecast
=== RUN   TestAccBudgetsBudget_autoAdjustDataHistorical
=== PAUSE TestAccBudgetsBudget_autoAdjustDataHistorical
=== RUN   TestAccBudgetsBudget_costTypes
=== PAUSE TestAccBudgetsBudget_costTypes
=== RUN   TestAccBudgetsBudget_notifications
=== PAUSE TestAccBudgetsBudget_notifications
=== CONT  TestAccBudgetsBudget_basic
=== CONT  TestAccBudgetsBudget_autoAdjustDataForecast
--- PASS: TestAccBudgetsBudget_autoAdjustDataForecast (19.37s)
=== CONT  TestAccBudgetsBudget_notifications
--- PASS: TestAccBudgetsBudget_basic (19.50s)
=== CONT  TestAccBudgetsBudget_costTypes
--- PASS: TestAccBudgetsBudget_costTypes (27.49s)
=== CONT  TestAccBudgetsBudget_autoAdjustDataHistorical
--- PASS: TestAccBudgetsBudget_notifications (31.83s)
=== CONT  TestAccBudgetsBudget_namePrefix
=== CONT  TestAccBudgetsBudget_autoAdjustDataHistorical
    budget_test.go:203: Step 1/3 error: Check failed: Check 5/12 error: aws_budgets_budget.test: Attribute 'auto_adjust_data.0.historical_options.0.lookback_available_periods' expected "2", got "0"
--- FAIL: TestAccBudgetsBudget_autoAdjustDataHistorical (8.55s)
=== CONT  TestAccBudgetsBudget_disappears
--- PASS: TestAccBudgetsBudget_disappears (11.86s)
=== CONT  TestAccBudgetsBudget_Name_generated
--- PASS: TestAccBudgetsBudget_namePrefix (16.41s)
--- PASS: TestAccBudgetsBudget_Name_generated (18.48s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/budgets	90.021s
FAIL
make: *** [testacc] Error 1
…cal'.

Acceptance test output:

% make testacc TESTARGS='-run=TestAccBudgetsBudget_autoAdjustDataHistorical' PKG=budgets ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/budgets/... -v -count 1 -parallel 2  -run=TestAccBudgetsBudget_autoAdjustDataHistorical -timeout 180m
=== RUN   TestAccBudgetsBudget_autoAdjustDataHistorical
=== PAUSE TestAccBudgetsBudget_autoAdjustDataHistorical
=== CONT  TestAccBudgetsBudget_autoAdjustDataHistorical
--- PASS: TestAccBudgetsBudget_autoAdjustDataHistorical (27.47s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/budgets	31.473s
Acceptance test output:

% make testacc TESTARGS='-run=TestAccBudgetsBudget_' PKG=budgets ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/budgets/... -v -count 1 -parallel 2  -run=TestAccBudgetsBudget_ -timeout 180m
=== RUN   TestAccBudgetsBudget_basic
=== PAUSE TestAccBudgetsBudget_basic
=== RUN   TestAccBudgetsBudget_Name_generated
=== PAUSE TestAccBudgetsBudget_Name_generated
=== RUN   TestAccBudgetsBudget_namePrefix
=== PAUSE TestAccBudgetsBudget_namePrefix
=== RUN   TestAccBudgetsBudget_disappears
=== PAUSE TestAccBudgetsBudget_disappears
=== RUN   TestAccBudgetsBudget_autoAdjustDataForecast
=== PAUSE TestAccBudgetsBudget_autoAdjustDataForecast
=== RUN   TestAccBudgetsBudget_autoAdjustDataHistorical
=== PAUSE TestAccBudgetsBudget_autoAdjustDataHistorical
=== RUN   TestAccBudgetsBudget_costTypes
=== PAUSE TestAccBudgetsBudget_costTypes
=== RUN   TestAccBudgetsBudget_notifications
=== PAUSE TestAccBudgetsBudget_notifications
=== CONT  TestAccBudgetsBudget_basic
=== CONT  TestAccBudgetsBudget_notifications
--- PASS: TestAccBudgetsBudget_basic (23.25s)
=== CONT  TestAccBudgetsBudget_autoAdjustDataForecast
--- PASS: TestAccBudgetsBudget_autoAdjustDataForecast (17.94s)
=== CONT  TestAccBudgetsBudget_costTypes
--- PASS: TestAccBudgetsBudget_notifications (43.26s)
=== CONT  TestAccBudgetsBudget_autoAdjustDataHistorical
--- PASS: TestAccBudgetsBudget_costTypes (27.08s)
=== CONT  TestAccBudgetsBudget_namePrefix
--- PASS: TestAccBudgetsBudget_autoAdjustDataHistorical (27.34s)
=== CONT  TestAccBudgetsBudget_disappears
--- PASS: TestAccBudgetsBudget_disappears (12.01s)
=== CONT  TestAccBudgetsBudget_Name_generated
--- PASS: TestAccBudgetsBudget_namePrefix (16.22s)
--- PASS: TestAccBudgetsBudget_Name_generated (17.16s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/budgets	103.805s
Acceptance test output:

% make testacc TESTARGS='-run=TestAccBudgetsBudget_plannedLimits' PKG=budgets ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/budgets/... -v -count 1 -parallel 2  -run=TestAccBudgetsBudget_plannedLimits -timeout 180m
=== RUN   TestAccBudgetsBudget_plannedLimits
=== PAUSE TestAccBudgetsBudget_plannedLimits
=== CONT  TestAccBudgetsBudget_plannedLimits
--- PASS: TestAccBudgetsBudget_plannedLimits (27.92s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/budgets	31.996s
@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. sweeper Pertains to changes to or issues with the sweeper. and removed size/L Managed by automation to categorize the size of a PR. labels Oct 28, 2022
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccBudgetsBudget_' PKG=budgets ACCTEST_PARALLELISM=2 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/budgets/... -v -count 1 -parallel 2  -run=TestAccBudgetsBudget_ -timeout 180m
=== RUN   TestAccBudgetsBudget_basic
=== PAUSE TestAccBudgetsBudget_basic
=== RUN   TestAccBudgetsBudget_Name_generated
=== PAUSE TestAccBudgetsBudget_Name_generated
=== RUN   TestAccBudgetsBudget_namePrefix
=== PAUSE TestAccBudgetsBudget_namePrefix
=== RUN   TestAccBudgetsBudget_disappears
=== PAUSE TestAccBudgetsBudget_disappears
=== RUN   TestAccBudgetsBudget_autoAdjustDataForecast
=== PAUSE TestAccBudgetsBudget_autoAdjustDataForecast
=== RUN   TestAccBudgetsBudget_autoAdjustDataHistorical
=== PAUSE TestAccBudgetsBudget_autoAdjustDataHistorical
=== RUN   TestAccBudgetsBudget_costTypes
=== PAUSE TestAccBudgetsBudget_costTypes
=== RUN   TestAccBudgetsBudget_notifications
=== PAUSE TestAccBudgetsBudget_notifications
=== RUN   TestAccBudgetsBudget_plannedLimits
=== PAUSE TestAccBudgetsBudget_plannedLimits
=== CONT  TestAccBudgetsBudget_basic
=== CONT  TestAccBudgetsBudget_autoAdjustDataHistorical
--- PASS: TestAccBudgetsBudget_basic (18.28s)
=== CONT  TestAccBudgetsBudget_disappears
--- PASS: TestAccBudgetsBudget_autoAdjustDataHistorical (30.14s)
=== CONT  TestAccBudgetsBudget_autoAdjustDataForecast
--- PASS: TestAccBudgetsBudget_disappears (13.09s)
=== CONT  TestAccBudgetsBudget_namePrefix
--- PASS: TestAccBudgetsBudget_autoAdjustDataForecast (17.46s)
=== CONT  TestAccBudgetsBudget_Name_generated
--- PASS: TestAccBudgetsBudget_namePrefix (17.39s)
=== CONT  TestAccBudgetsBudget_notifications
--- PASS: TestAccBudgetsBudget_Name_generated (17.76s)
=== CONT  TestAccBudgetsBudget_plannedLimits
--- PASS: TestAccBudgetsBudget_notifications (33.55s)
=== CONT  TestAccBudgetsBudget_costTypes
--- PASS: TestAccBudgetsBudget_plannedLimits (29.43s)
--- PASS: TestAccBudgetsBudget_costTypes (27.64s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/budgets	114.139s

@ewbankkit ewbankkit merged commit faf7305 into main Oct 28, 2022
@ewbankkit ewbankkit deleted the f-budgets-auto-adjust branch October 28, 2022 15:07
@github-actions github-actions bot added this to the v4.38.0 milestone Oct 28, 2022
github-actions bot pushed a commit that referenced this pull request Oct 28, 2022
@github-actions
Copy link

github-actions bot commented Nov 3, 2022

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

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Dec 4, 2022

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/budgets Issues and PRs that pertain to the budgets service. size/XL Managed by automation to categorize the size of a PR. sweeper Pertains to changes to or issues with the sweeper. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
3 participants