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 Support for dynamodb billing #6648

Merged
merged 7 commits into from
Nov 30, 2018

Conversation

sunilkumarmohanty
Copy link
Contributor

Fixes #6632

Changes proposed in this pull request:

  • Adds support for dynamodb billing

@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. dependencies Used to indicate dependency changes. documentation Introduces or discusses updates to documentation. service/dynamodb Issues and PRs that pertain to the dynamodb service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 29, 2018
Copy link
Contributor

@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.

Thanks for submitting this @sunilkumarmohanty! If this PR is no longer work in progress, we should remove the WIP in the title. I merged the dependency update as well so this PR can be rebased.

Left initial comments below. Please let us know if you have any questions or do not have time to implement feedback as we'll likely want to get this in before middle of next week. 👍

aws/resource_aws_dynamodb_table.go Outdated Show resolved Hide resolved
aws/resource_aws_dynamodb_table.go Outdated Show resolved Hide resolved
aws/resource_aws_dynamodb_table.go Show resolved Hide resolved
aws/resource_aws_dynamodb_table.go Outdated Show resolved Hide resolved
website/docs/r/dynamodb_table.html.markdown Show resolved Hide resolved
aws/resource_aws_dynamodb_table_test.go Outdated Show resolved Hide resolved
@bflad bflad added this to the v1.51.0 milestone Nov 30, 2018
@sunilkumarmohanty sunilkumarmohanty changed the title WIP: Add Support for dynamodb billing Add Support for dynamodb billing Nov 30, 2018
@ghost ghost added size/M Managed by automation to categorize the size of a PR. and removed size/XXL Managed by automation to categorize the size of a PR. labels Nov 30, 2018
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. and removed dependencies Used to indicate dependency changes. labels Nov 30, 2018
Copy link
Contributor

@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.

When running the updated acceptance testing for the resource, I discovered some additional issues. Please take a look at the below and let us know if you have any questions.

aws/resource_aws_dynamodb_table.go Show resolved Hide resolved
aws/resource_aws_dynamodb_table_test.go Outdated Show resolved Hide resolved
aws/resource_aws_dynamodb_table_test.go Outdated Show resolved Hide resolved
aws/resource_aws_dynamodb_table_test.go Outdated Show resolved Hide resolved
aws/resource_aws_dynamodb_table_test.go Outdated Show resolved Hide resolved
@ghost ghost added size/L 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 Nov 30, 2018
Copy link
Contributor

@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.

Thanks @sunilkumarmohanty! This should be good for the initial implementation. 🚀

In the future, when the Terraform provider SDK gives us the ability, we can add plan-time validation for read/write capacity if the billing mode is provisioned. 👍

--- PASS: TestAccAWSDynamoDbTable_streamSpecificationValidation (1.63s)
--- PASS: TestAccAWSDynamoDbTable_importTags (50.68s)
--- PASS: TestAccAWSDynamoDbTable_tags (68.57s)
--- PASS: TestAccAWSDynamoDbTable_BillingMode (87.00s)
--- PASS: TestAccAWSDynamoDbTable_basic (110.25s)
--- PASS: TestAccAWSDynamoDbTable_streamSpecification (125.15s)
--- PASS: TestAccAWSDynamoDbTable_attributeUpdateValidation (1.27s)
--- PASS: TestAccAWSDynamoDbTable_importBasic (130.24s)
--- PASS: TestAccAWSDynamoDbTable_importTimeToLive (130.35s)
--- PASS: TestAccAWSDynamoDbTable_ttl (53.10s)
--- PASS: TestAccAWSDynamoDbTable_gsiUpdateCapacity (178.94s)
--- PASS: TestAccAWSDynamoDbTable_encryption (129.89s)
--- PASS: TestAccAWSDynamoDbTable_gsiUpdateNonKeyAttributes (251.68s)
--- PASS: TestAccAWSDynamoDbTable_extended (323.92s)
--- PASS: TestAccAWSDynamoDbTable_enablePitr (520.96s)
--- PASS: TestAccAWSDynamoDbTable_attributeUpdate (512.32s)
--- PASS: TestAccAWSDynamoDbTable_gsiUpdateOtherAttributes (573.46s)

@bflad bflad merged commit ee1f864 into hashicorp:master Nov 30, 2018
bflad added a commit that referenced this pull request Nov 30, 2018
@sunilkumarmohanty sunilkumarmohanty deleted the dynamodb-billing branch November 30, 2018 21:25
@mschroering
Copy link

global_secondary_index.write_capacity and global_secondary_index.read_capacity should also be made optional as they are not required when the billing mode is on demand.

@bflad
Copy link
Contributor

bflad commented Dec 5, 2018

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

@bflad
Copy link
Contributor

bflad commented Dec 5, 2018

I would suggest creating a separate issue for making GSI capacities optional. 👍

Copy link

@briceburg briceburg left a comment

Choose a reason for hiding this comment

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

this PR is breaking the ability to terraform dynamodb_table in govcloud (apparently BillingMode is not supported by their implemntation yet)

* aws_dynamodb_table.tfstate: ValidationException: One or more parameter values were invalid: Unsupported input parameter BillingMode

@ghost
Copy link

ghost commented Apr 1, 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 1, 2020
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. service/dynamodb Issues and PRs that pertain to the dynamodb service. size/L 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.

DynamoDB On Demand Scaling
5 participants