-
Notifications
You must be signed in to change notification settings - Fork 403
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
DynamoDB billing mode support #753
DynamoDB billing mode support #753
Conversation
Thanks for following up here @marknet15 |
Is it possible to change from provisioned to per-request? |
@tremble I think it is yes, I'll test it out locally and extend the tests: |
recheck |
plugins/modules/dynamodb_table.py
Outdated
description: | ||
- Controls whether provisoned pr on-demand tables are created. | ||
choices: ['PROVISIONED', 'PAY_PER_REQUEST'] | ||
default: 'PROVISIONED' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My instincts tell me that setting a default here, and relying on it, is going to result in weird things happening when people try to make minimal changes to a Pay-Per-Request cluster if they don't specify billing_mode. For example they try to add a secondary index and the whole cluster changes from provisioned to pay-per-request.
It might be better to see if this can be read from the current table (except when creating a table)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll re-work things a bit as that makes sense yes 👍🏻
recheck |
@tremble when you get a moment would you be able to re-review ? |
5430991
to
51b0fc5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @marknet15, LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Many thanks everyone, awesome 🎉 |
Add missed changelog fragment for dynamodb SUMMARY Add missed change_log fragment for #753 ISSUE TYPE Docs Pull Request COMPONENT NAME dynamodb_table Reviewed-by: Mark Chappell <None> Reviewed-by: None <None>
@marknet15 @tremble is another tag planned soon, so i can use this feature in the galaxy collection? 🤩 |
@nick-zh version 2.1 of the collection was released today 🚀 |
Works like a charm, thx again 🎉 |
SUMMARY
Current the
dynamodb_table
module only supports provisioned table creations, this adds support for defining abilling_mode
to create eitherpay_per_request
orprovisioned
tables.https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Client.create_table
This change does also allow for changing the
billing_mode
on existing tables.fixes: #609
ISSUE TYPE
COMPONENT NAME
dynamodb_table
ADDITIONAL INFORMATION
Example of creating a DynamoDB table with
pay_per_request
: