-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
d/aws_dynamodb_table: Add missing 'billing_mode' and 'point_in_time_recovery' attributes #7497
Conversation
Partially replaces #5666. |
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, thanks @ewbankkit! 🚀
--- PASS: TestAccDataSourceAwsDynamoDbTable_basic (120.82s)
TableName: aws.String(d.Id()), | ||
}) | ||
if err != nil && !isAWSErr(err, "UnknownOperationException", "") { | ||
return err |
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.
Nit: We should return error context here for operators and code maintainers, e.g.
return fmt.Errorf("error reading DynamoDB Table (%s) continuous backups: %s", d.Id(), err)
Since the same problem exists in the resource, not marking as a review blocker.
if err != nil && !isAWSErr(err, "UnknownOperationException", "") { | ||
return err | ||
} | ||
d.Set("point_in_time_recovery", flattenDynamoDbPitr(pitrOut)) |
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.
When using d.Set()
with aggregate types (TypeList, TypeSet, TypeMap), we should perform error checking to prevent issues where the code is not properly able to set the Terraform state. e.g.
if err := d.Set("point_in_time_recovery", flattenDynamoDbPitr(pitrOut)); err != nil {
return fmt.Errorf("error setting point_in_time_recovery: %s", err)
}
Since the same problem exists in the resource, not marking as a review blocker.
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. |
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! |
Fixes #7496.
Acceptance tests: