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

resource/aws_dynamodb_table: Perform individual replica creations/deletions #13523

Merged
merged 2 commits into from Jun 3, 2020

Conversation

bflad
Copy link
Member

@bflad bflad commented May 27, 2020

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 #13132

Release note for CHANGELOG:

* resource/aws_dynamodb_table: Prevent multiple replica creation/deletion errors

Also includes slight changes to the acceptance testing recommendations for cross-region testing since we now are introducing the framework to test a third region. If approved, will followup this change with refactoring of the existing testing to use the newer functions.

Previously:

--- FAIL: TestAccAWSDynamoDbTable_Replica_Multiple (41.02s)
    TestAccAWSDynamoDbTable_Replica_Multiple: testing.go:684: Step 0 error: errors during apply:

        Error: error creating DynamoDB Table (TerraformTestTable--8440396559818741779) replicas: error creating DynamoDB Table (TerraformTestTable--8440396559818741779) replicas: ValidationException: Update table operation with more than one create or delete replica actions not allowed
          status code: 400, request id: 5MA0CQ5LJAVOKM671RT7QTKRTJVV4KQNSO5AEMVJF66Q9ASUAAJG

          on /var/folders/w8/05f3x02n27x72g0mc2jy6_180000gp/T/tf-test945359260/main.tf line 20:
          (source code not available)

Output from acceptance testing:

--- PASS: TestAccAWSDynamoDbTable_attributeUpdate (756.09s)
--- PASS: TestAccAWSDynamoDbTable_attributeUpdateValidation (17.31s)
--- PASS: TestAccAWSDynamoDbTable_basic (82.00s)
--- PASS: TestAccAWSDynamoDbTable_BillingMode_GSI_PayPerRequestToProvisioned (135.99s)
--- PASS: TestAccAWSDynamoDbTable_BillingMode_GSI_ProvisionedToPayPerRequest (1296.50s)
--- PASS: TestAccAWSDynamoDbTable_BillingMode_PayPerRequestToProvisioned (134.93s)
--- PASS: TestAccAWSDynamoDbTable_BillingMode_ProvisionedToPayPerRequest (934.09s)
--- PASS: TestAccAWSDynamoDbTable_disappears (59.40s)
--- PASS: TestAccAWSDynamoDbTable_disappears_PayPerRequestWithGSI (140.30s)
--- PASS: TestAccAWSDynamoDbTable_enablePitr (152.34s)
--- PASS: TestAccAWSDynamoDbTable_encryption (249.98s)
--- PASS: TestAccAWSDynamoDbTable_extended (443.38s)
--- PASS: TestAccAWSDynamoDbTable_gsiUpdateCapacity (144.47s)
--- PASS: TestAccAWSDynamoDbTable_gsiUpdateNonKeyAttributes (443.69s)
--- PASS: TestAccAWSDynamoDbTable_gsiUpdateOtherAttributes (757.61s)
--- PASS: TestAccAWSDynamoDbTable_Replica_Multiple (1193.16s)
--- PASS: TestAccAWSDynamoDbTable_Replica_Single (1077.60s)
--- PASS: TestAccAWSDynamoDbTable_streamSpecification (148.25s)
--- PASS: TestAccAWSDynamoDbTable_streamSpecificationValidation (12.21s)
--- PASS: TestAccAWSDynamoDbTable_tags (88.24s)
--- PASS: TestAccAWSDynamoDbTable_Ttl_Disabled (116.66s)
--- PASS: TestAccAWSDynamoDbTable_Ttl_Enabled (81.82s)

…etions

Reference: #13132

Also includes slight changes to the acceptance testing recommendations for cross-region testing since we now are introducing the framework to test a third region. If approved, will followup this change with refactoring of the existing testing to use the newer functions.

Previously:

```
--- FAIL: TestAccAWSDynamoDbTable_Replica_Multiple (41.02s)
    TestAccAWSDynamoDbTable_Replica_Multiple: testing.go:684: Step 0 error: errors during apply:

        Error: error creating DynamoDB Table (TerraformTestTable--8440396559818741779) replicas: error creating DynamoDB Table (TerraformTestTable--8440396559818741779) replicas: ValidationException: Update table operation with more than one create or delete replica actions not allowed
          status code: 400, request id: 5MA0CQ5LJAVOKM671RT7QTKRTJVV4KQNSO5AEMVJF66Q9ASUAAJG

          on /var/folders/w8/05f3x02n27x72g0mc2jy6_180000gp/T/tf-test945359260/main.tf line 20:
          (source code not available)
```

Output from acceptance testing:

```
--- PASS: TestAccAWSDynamoDbTable_attributeUpdate (756.09s)
--- PASS: TestAccAWSDynamoDbTable_attributeUpdateValidation (17.31s)
--- PASS: TestAccAWSDynamoDbTable_basic (82.00s)
--- PASS: TestAccAWSDynamoDbTable_BillingMode_GSI_PayPerRequestToProvisioned (135.99s)
--- PASS: TestAccAWSDynamoDbTable_BillingMode_GSI_ProvisionedToPayPerRequest (1296.50s)
--- PASS: TestAccAWSDynamoDbTable_BillingMode_PayPerRequestToProvisioned (134.93s)
--- PASS: TestAccAWSDynamoDbTable_BillingMode_ProvisionedToPayPerRequest (934.09s)
--- PASS: TestAccAWSDynamoDbTable_disappears (59.40s)
--- PASS: TestAccAWSDynamoDbTable_disappears_PayPerRequestWithGSI (140.30s)
--- PASS: TestAccAWSDynamoDbTable_enablePitr (152.34s)
--- PASS: TestAccAWSDynamoDbTable_encryption (249.98s)
--- PASS: TestAccAWSDynamoDbTable_extended (443.38s)
--- PASS: TestAccAWSDynamoDbTable_gsiUpdateCapacity (144.47s)
--- PASS: TestAccAWSDynamoDbTable_gsiUpdateNonKeyAttributes (443.69s)
--- PASS: TestAccAWSDynamoDbTable_gsiUpdateOtherAttributes (757.61s)
--- PASS: TestAccAWSDynamoDbTable_Replica_Multiple (1193.16s)
--- PASS: TestAccAWSDynamoDbTable_Replica_Single (1077.60s)
--- PASS: TestAccAWSDynamoDbTable_streamSpecification (148.25s)
--- PASS: TestAccAWSDynamoDbTable_streamSpecificationValidation (12.21s)
--- PASS: TestAccAWSDynamoDbTable_tags (88.24s)
--- PASS: TestAccAWSDynamoDbTable_Ttl_Disabled (116.66s)
--- PASS: TestAccAWSDynamoDbTable_Ttl_Enabled (81.82s)
```
@bflad bflad added the bug Addresses a defect in current functionality. label May 27, 2020
@bflad bflad requested a review from a team May 27, 2020 23:43
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/dynamodb Issues and PRs that pertain to the dynamodb service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels May 27, 2020
@gdavison gdavison self-assigned this Jun 1, 2020
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

--- PASS: TestAccAWSDynamoDbTable_streamSpecificationValidation (5.08s)
--- PASS: TestAccAWSDynamoDbTable_disappears (17.64s)
--- PASS: TestAccAWSDynamoDbTable_attributeUpdateValidation (5.57s)
--- PASS: TestAccAWSDynamoDbTable_basic (22.21s)
--- PASS: TestAccAWSDynamoDbTable_Ttl_Enabled (18.01s)
--- PASS: TestAccAWSDynamoDbTable_Ttl_Disabled (22.78s)
--- PASS: TestAccAWSDynamoDbTable_BillingMode_PayPerRequestToProvisioned (33.90s)
--- PASS: TestAccAWSDynamoDbTable_tags (26.28s)
--- PASS: TestAccAWSDynamoDbTable_enablePitr (41.25s)
--- PASS: TestAccAWSDynamoDbTable_gsiUpdateCapacity (36.07s)
--- PASS: TestAccAWSDynamoDbTable_streamSpecification (45.78s)
--- PASS: TestAccAWSDynamoDbTable_BillingMode_GSI_PayPerRequestToProvisioned (48.55s)
--- PASS: TestAccAWSDynamoDbTable_disappears_PayPerRequestWithGSI (67.81s)
--- PASS: TestAccAWSDynamoDbTable_encryption (102.17s)
--- PASS: TestAccAWSDynamoDbTable_extended (147.74s)
--- PASS: TestAccAWSDynamoDbTable_gsiUpdateNonKeyAttributes (137.31s)
--- PASS: TestAccAWSDynamoDbTable_Replica_Single (393.83s)
--- PASS: TestAccAWSDynamoDbTable_attributeUpdate (455.02s)
--- PASS: TestAccAWSDynamoDbTable_gsiUpdateOtherAttributes (457.88s)
--- PASS: TestAccAWSDynamoDbTable_BillingMode_GSI_ProvisionedToPayPerRequest (565.61s)
--- PASS: TestAccAWSDynamoDbTable_BillingMode_ProvisionedToPayPerRequest (812.32s)
--- PASS: TestAccAWSDynamoDbTable_Replica_Multiple (1737.87s)
--- PASS: TestAccAWSProvider_Region_AwsCommercial (10.44s)
--- PASS: TestAccAWSProvider_Region_AwsChina (10.57s)
--- PASS: TestAccAWSProvider_Region_AwsGovCloudUs (10.37s)
--- PASS: TestAccAWSProvider_IgnoreTags_EmptyConfigurationBlock (11.04s)
--- PASS: TestAccAWSProvider_IgnoreTags_Keys_None (10.93s)
--- PASS: TestAccAWSProvider_IgnoreTags_Keys_Multiple (10.94s)
--- PASS: TestAccAWSProvider_IgnoreTags_KeyPrefixes_One (10.83s)
--- PASS: TestAccAWSProvider_IgnoreTags_KeyPrefixes_Multiple (11.36s)
--- PASS: TestAccAWSProvider_IgnoreTags_Keys_One (11.73s)
--- PASS: TestAccAWSProvider_IgnoreTags_KeyPrefixes_None (11.30s)
--- PASS: TestAccAWSProvider_Endpoints_Deprecated (11.78s)
--- PASS: TestAccAWSProvider_Endpoints (11.98s)
--- PASS: TestAccAWSProvider_AssumeRole_Empty (17.46s)

@bflad bflad added this to the v2.65.0 milestone Jun 3, 2020
@bflad bflad merged commit 46d77cf into master Jun 3, 2020
@bflad bflad deleted the b-aws_dynamodb_table-multiple-replicas branch June 3, 2020 23:24
bflad added a commit that referenced this pull request Jun 3, 2020
@ghost
Copy link

ghost commented Jun 5, 2020

This has been released in version 2.65.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 for triage. Thanks!

@ghost
Copy link

ghost commented Jul 4, 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!

@hashicorp hashicorp locked and limited conversation to collaborators Jul 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/dynamodb Issues and PRs that pertain to the dynamodb service. 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.

DynamoDB Global table V2 - Creation fails with multiple replicas
2 participants