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 Resource for Cost and Usage Report Definitions #7432

Merged
merged 16 commits into from
Feb 13, 2019
Merged

Add Resource for Cost and Usage Report Definitions #7432

merged 16 commits into from
Feb 13, 2019

Conversation

jbmchuck
Copy link
Contributor

@jbmchuck jbmchuck commented Feb 2, 2019

Changes proposed in this pull request:

  • Add new resource for Cost and Usage Report Definitions

A separate PR exists for adding the sdk portion: #7433

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAwsCurReportDefinition_basic'          
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -parallel 20 -run=TestAccAwsCurReportDefinition_basic -timeout 120m
=== RUN   TestAccAwsCurReportDefinition_basic
--- PASS: TestAccAwsCurReportDefinition_basic (33.34s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws

$ make testacc TEST=./aws TESTARGS='-run=TestAccDataSourceAwsCurReportDefinition_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -parallel 20 -run=TestAccDataSourceAwsCurReportDefinition_basic -timeout 120m
=== RUN   TestAccDataSourceAwsCurReportDefinition_basic
=== PAUSE TestAccDataSourceAwsCurReportDefinition_basic
=== CONT  TestAccDataSourceAwsCurReportDefinition_basic
--- PASS: TestAccDataSourceAwsCurReportDefinition_basic (29.89s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws

@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. dependencies Used to indicate dependency changes. provider Pertains to the provider itself, rather than any interaction with AWS. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Feb 2, 2019
@jbmchuck jbmchuck closed this Feb 2, 2019
@jbmchuck jbmchuck reopened this Feb 2, 2019
@jbmchuck jbmchuck changed the title [WIP] Add Resource for Cost and Usage Report Definitions Add Resource for Cost and Usage Report Definitions Feb 4, 2019
Copy link
Member

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Hi @jbmchuck 👋 Thanks for submitting this! This is off to a good start. Please see the below for some initial feedback and let us know if you have any questions or do not have time to implement the items.

aws/data_source_aws_cur_report_definition_test.go Outdated Show resolved Hide resolved
aws/data_source_aws_cur_report_definition_test.go Outdated Show resolved Hide resolved
aws/data_source_aws_cur_report_definition_test.go Outdated Show resolved Hide resolved
aws/resource_aws_cur_report_definition.go Outdated Show resolved Hide resolved
aws/resource_aws_cur_report_definition.go Outdated Show resolved Hide resolved
website/docs/d/cur_report_definition.html.markdown Outdated Show resolved Hide resolved
website/docs/r/cur_report_definition.html.markdown Outdated Show resolved Hide resolved
aws/resource_aws_cur_report_definition.go Outdated Show resolved Hide resolved
website/docs/r/cur_report_definition.html.markdown Outdated Show resolved Hide resolved
@bflad bflad added waiting-response Maintainers are waiting on response from community or contributor. new-resource Introduces a new resource. new-data-source Introduces a new data source. service/costandusagereportservice and removed dependencies Used to indicate dependency changes. labels Feb 12, 2019
@ghost ghost added the dependencies Used to indicate dependency changes. label Feb 12, 2019
bflad and others added 3 commits February 12, 2019 10:52
Co-Authored-By: jbmchuck <nospam@kuber.net>
Co-Authored-By: jbmchuck <nospam@kuber.net>
@jbmchuck
Copy link
Contributor Author

jbmchuck commented Feb 12, 2019

Thanks for the feedback! I should be able to get through these today.

@ghost ghost removed the waiting-response Maintainers are waiting on response from community or contributor. label Feb 12, 2019
@jbmchuck
Copy link
Contributor Author

@bflad Thanks again for the guidance - I've implemented the suggestions - let me know if there are any other issues. Acceptance test output after the changes:

make testacc TEST=./aws TESTARGS='-run=TestAccAwsCurReportDefinition_basic'

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -parallel 20 -run=TestAccAwsCurReportDefinition_basic -timeout 120m
=== RUN   TestAccAwsCurReportDefinition_basic
--- PASS: TestAccAwsCurReportDefinition_basic (26.35s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws   26.414s

--

make testacc TEST=./aws TESTARGS='-run=TestAccDataSourceAwsCurReportDefinition_basic'

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -parallel 20 -run=TestAccDataSourceAwsCurReportDefinition_basic -timeout 120m
=== RUN   TestAccDataSourceAwsCurReportDefinition_basic
=== PAUSE TestAccDataSourceAwsCurReportDefinition_basic
=== CONT  TestAccDataSourceAwsCurReportDefinition_basic
--- PASS: TestAccDataSourceAwsCurReportDefinition_basic (32.12s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws   32.162s

@bflad bflad added this to the v1.59.0 milestone Feb 13, 2019
Copy link
Member

@bflad bflad left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @jbmchuck! 🚀

Maintainer note: I added a PreCheck function for both these acceptance tests so they won't continually fail in our normal acceptance testing account.

Output from standalone AWS account acceptance testing:

--- PASS: TestAccAwsCurReportDefinition_basic (9.46s)
--- PASS: TestAccDataSourceAwsCurReportDefinition_basic (10.61s)

Output from member AWS Organizations account acceptance testing:

--- SKIP: TestAccAwsCurReportDefinition_basic (1.69s)
        resource_aws_cur_report_definition_test.go:99: skipping acceptance testing: AccessDeniedException: accountId: 123456789012 is not authorized to callDescribeReportDefinitions. Note: linked account is not allowed to modify report preference.
                    status code: 400, request id: 2338fb64-4983-4e60-bdb7-42ad4a7cd294
--- SKIP: TestAccDataSourceAwsCurReportDefinition_basic (1.70s)
        resource_aws_cur_report_definition_test.go:99: skipping acceptance testing: AccessDeniedException: accountId: 123456789012 is not authorized to callDescribeReportDefinitions. Note: linked account is not allowed to modify report preference.
                    status code: 400, request id: 9029d7bc-406a-44df-bbda-e1bcf61ca687

@bflad bflad merged commit 1c542c6 into hashicorp:master Feb 13, 2019
bflad added a commit that referenced this pull request Feb 13, 2019
@bflad
Copy link
Member

bflad commented Feb 14, 2019

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

@scott-robinson-duke
Copy link

Is someone working to add additional compression/format options (Parquet) or additonal artifacts (Athena)? Thanks in advance!

@ghost
Copy link

ghost commented Nov 1, 2019

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 Nov 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Used to indicate dependency changes. documentation Introduces or discusses updates to documentation. new-data-source Introduces a new data source. new-resource Introduces a new resource. provider Pertains to the provider itself, rather than any interaction with AWS. size/XXL 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.

None yet

3 participants