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

r/aws_cur_report_definition: support update #19705

Merged
merged 8 commits into from
Jun 9, 2021

Conversation

DrFaust92
Copy link
Collaborator

Community Note

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

Closes #9852

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

@ghost ghost added size/M Managed by automation to categorize the size of a PR. labels Jun 7, 2021
@github-actions github-actions bot added service/costandusagereportservice tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jun 7, 2021
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Jun 8, 2021
@github-actions github-actions bot added the documentation Introduces or discusses updates to documentation. label Jun 8, 2021
@DrFaust92 DrFaust92 added the enhancement Requests to existing resources that expand the functionality or scope. label Jun 8, 2021
@DrFaust92 DrFaust92 marked this pull request as ready for review June 8, 2021 12:11
@DrFaust92 DrFaust92 requested a review from a team as a code owner June 8, 2021 12:11
@DrFaust92
Copy link
Collaborator Author

Hitting some quotas on this and cant test properly

@ewbankkit ewbankkit self-assigned this Jun 9, 2021
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 🚀.

Commercial
% AWS_DEFAULT_REGION=us-east-1 make testacc TEST=./aws TESTARGS='-run=TestAccAwsCur_serial/ReportDefinition'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAwsCur_serial/ReportDefinition -timeout 180m
=== RUN   TestAccAwsCur_serial
=== RUN   TestAccAwsCur_serial/ReportDefinition
=== RUN   TestAccAwsCur_serial/ReportDefinition/athena
=== PAUSE TestAccAwsCur_serial/ReportDefinition/athena
=== RUN   TestAccAwsCur_serial/ReportDefinition/refresh
=== PAUSE TestAccAwsCur_serial/ReportDefinition/refresh
=== RUN   TestAccAwsCur_serial/ReportDefinition/overwrite
=== PAUSE TestAccAwsCur_serial/ReportDefinition/overwrite
=== RUN   TestAccAwsCur_serial/ReportDefinition/basic
=== PAUSE TestAccAwsCur_serial/ReportDefinition/basic
=== RUN   TestAccAwsCur_serial/ReportDefinition/disappears
=== PAUSE TestAccAwsCur_serial/ReportDefinition/disappears
=== RUN   TestAccAwsCur_serial/ReportDefinition/textOrCsv
=== PAUSE TestAccAwsCur_serial/ReportDefinition/textOrCsv
=== RUN   TestAccAwsCur_serial/ReportDefinition/parquet
=== PAUSE TestAccAwsCur_serial/ReportDefinition/parquet
=== CONT  TestAccAwsCur_serial/ReportDefinition/athena
=== CONT  TestAccAwsCur_serial/ReportDefinition/disappears
=== CONT  TestAccAwsCur_serial/ReportDefinition/refresh
=== CONT  TestAccAwsCur_serial/ReportDefinition/overwrite
=== CONT  TestAccAwsCur_serial/ReportDefinition/basic
=== CONT  TestAccAwsCur_serial/ReportDefinition/textOrCsv
=== CONT  TestAccAwsCur_serial/ReportDefinition/parquet
--- PASS: TestAccAwsCur_serial (37.04s)
    --- PASS: TestAccAwsCur_serial/ReportDefinition (0.00s)
        --- PASS: TestAccAwsCur_serial/ReportDefinition/textOrCsv (26.25s)
        --- PASS: TestAccAwsCur_serial/ReportDefinition/disappears (26.47s)
        --- PASS: TestAccAwsCur_serial/ReportDefinition/athena (26.82s)
        --- PASS: TestAccAwsCur_serial/ReportDefinition/parquet (26.83s)
        --- PASS: TestAccAwsCur_serial/ReportDefinition/overwrite (26.84s)
        --- PASS: TestAccAwsCur_serial/ReportDefinition/refresh (27.66s)
        --- PASS: TestAccAwsCur_serial/ReportDefinition/basic (37.04s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	40.036s
% TEST=./aws SWEEP=us-east-1 SWEEPARGS=-sweep-run=aws_cur_report_definition make sweep
WARNING: This will destroy infrastructure. Use only in development accounts.
go test ./aws -v -sweep=us-east-1 -sweep-run=aws_cur_report_definition -timeout 60m
2021/06/09 16:49:55 [DEBUG] Running Sweepers for region (us-east-1):
2021/06/09 16:49:55 [DEBUG] Running Sweeper (aws_cur_report_definition) in region (us-east-1)
2021/06/09 16:49:55 [INFO] AWS Auth provider used: "EnvProvider"
2021/06/09 16:49:55 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/06/09 16:49:56 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/06/09 16:49:56 [DEBUG] Deleting Cost And Usage Report Definition (tf_acc_test-7305689601508686821)
2021/06/09 16:49:56 Sweeper Tests ran successfully:
	- aws_cur_report_definition
ok  	github.com/terraform-providers/terraform-provider-aws/aws	3.973s
GovCloud
% make testacc TEST=./aws TESTARGS='-run=TestAccAwsCur_serial/ReportDefinition'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAwsCur_serial/ReportDefinition -timeout 180m
=== RUN   TestAccAwsCur_serial
=== RUN   TestAccAwsCur_serial/ReportDefinition
=== RUN   TestAccAwsCur_serial/ReportDefinition/textOrCsv
=== PAUSE TestAccAwsCur_serial/ReportDefinition/textOrCsv
=== RUN   TestAccAwsCur_serial/ReportDefinition/parquet
=== PAUSE TestAccAwsCur_serial/ReportDefinition/parquet
=== RUN   TestAccAwsCur_serial/ReportDefinition/athena
=== PAUSE TestAccAwsCur_serial/ReportDefinition/athena
=== RUN   TestAccAwsCur_serial/ReportDefinition/refresh
=== PAUSE TestAccAwsCur_serial/ReportDefinition/refresh
=== RUN   TestAccAwsCur_serial/ReportDefinition/overwrite
=== PAUSE TestAccAwsCur_serial/ReportDefinition/overwrite
=== RUN   TestAccAwsCur_serial/ReportDefinition/basic
=== PAUSE TestAccAwsCur_serial/ReportDefinition/basic
=== RUN   TestAccAwsCur_serial/ReportDefinition/disappears
=== PAUSE TestAccAwsCur_serial/ReportDefinition/disappears
=== CONT  TestAccAwsCur_serial/ReportDefinition/textOrCsv
=== CONT  TestAccAwsCur_serial/ReportDefinition/overwrite
=== CONT  TestAccAwsCur_serial/ReportDefinition/basic
=== CONT  TestAccAwsCur_serial/ReportDefinition/athena
=== CONT  TestAccAwsCur_serial/ReportDefinition/refresh
=== CONT  TestAccAwsCur_serial/ReportDefinition/disappears
=== CONT  TestAccAwsCur_serial/ReportDefinition/parquet
=== CONT  TestAccAwsCur_serial/ReportDefinition/textOrCsv
    provider_test.go:734: skipping tests; partition aws-us-gov does not support cur service
=== CONT  TestAccAwsCur_serial/ReportDefinition/overwrite
    provider_test.go:734: skipping tests; partition aws-us-gov does not support cur service
=== CONT  TestAccAwsCur_serial/ReportDefinition/basic
    provider_test.go:734: skipping tests; partition aws-us-gov does not support cur service
=== CONT  TestAccAwsCur_serial/ReportDefinition/refresh
    provider_test.go:734: skipping tests; partition aws-us-gov does not support cur service
=== CONT  TestAccAwsCur_serial/ReportDefinition/athena
    provider_test.go:734: skipping tests; partition aws-us-gov does not support cur service
=== CONT  TestAccAwsCur_serial/ReportDefinition/parquet
    provider_test.go:734: skipping tests; partition aws-us-gov does not support cur service
=== CONT  TestAccAwsCur_serial/ReportDefinition/disappears
    provider_test.go:734: skipping tests; partition aws-us-gov does not support cur service
--- PASS: TestAccAwsCur_serial (1.49s)
    --- PASS: TestAccAwsCur_serial/ReportDefinition (0.00s)
        --- SKIP: TestAccAwsCur_serial/ReportDefinition/overwrite (1.49s)
        --- SKIP: TestAccAwsCur_serial/ReportDefinition/textOrCsv (1.49s)
        --- SKIP: TestAccAwsCur_serial/ReportDefinition/basic (1.49s)
        --- SKIP: TestAccAwsCur_serial/ReportDefinition/refresh (1.49s)
        --- SKIP: TestAccAwsCur_serial/ReportDefinition/athena (1.49s)
        --- SKIP: TestAccAwsCur_serial/ReportDefinition/parquet (1.49s)
        --- SKIP: TestAccAwsCur_serial/ReportDefinition/disappears (1.49s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	4.348s

@ewbankkit
Copy link
Contributor

@DrFaust92 Thanks for the contribution 🎉 👏.
I pushed a couple of additions to address the API rate limiting:

  • Used the _serial acceptance test pattern to serialize the tests
  • Added a test sweeper as there is a very low number of report definitions allowed in an account

@ewbankkit ewbankkit merged commit c98e97c into hashicorp:main Jun 9, 2021
@github-actions github-actions bot added this to the v3.45.0 milestone Jun 9, 2021
@DrFaust92 DrFaust92 deleted the r/cur_definition_update branch June 9, 2021 21:25
@github-actions
Copy link

This functionality has been released in v3.45.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

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 Jul 12, 2021
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. enhancement Requests to existing resources that expand the functionality or scope. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

r/aws_cur_report_definition: Report definitions can be updated
2 participants