Skip to content

fix bug that cause altered key value item to be deleted #43208

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

frek818
Copy link
Contributor

@frek818 frek818 commented Jun 27, 2025

Fixes #43190

@frek818 frek818 requested a review from a team as a code owner June 27, 2025 03:08
Copy link

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

Copy link

github-actions bot commented Jun 27, 2025

✅ Thank you for correcting the previously detected issues! The maintainers appreciate your efforts to make the review process as smooth as possible.

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/cloudfrontkeyvaluestore Issues and PRs that pertain to the cloudfrontkeyvaluestore service. size/S Managed by automation to categorize the size of a PR. size/M Managed by automation to categorize the size of a PR. labels Jun 27, 2025
@frek818 frek818 changed the title fix bug that cause alter key value item to be deleted fix bug that cause altered key value item to be deleted Jun 27, 2025
@frek818 frek818 force-pushed the b-aws_cloudfrontkeyvaluestore_keys_exclusive-pair-update branch from c9883b8 to 543c01f Compare June 27, 2025 04:20
@frek818 frek818 force-pushed the b-aws_cloudfrontkeyvaluestore_keys_exclusive-pair-update branch from 543c01f to 54ae632 Compare June 27, 2025 04:21
@frek818 frek818 force-pushed the b-aws_cloudfrontkeyvaluestore_keys_exclusive-pair-update branch from 54ae632 to 895e76d Compare June 27, 2025 04:23
@brittandeyoung brittandeyoung added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 27, 2025
@brittandeyoung
Copy link
Collaborator

brittandeyoung commented Jun 27, 2025

@frek818 Thank you for raising the PR! I have added a few code suggestions to ensure the test case is properly testing the update flow.

Once updated. Please include the output of locally running the acceptance tests in the PR description.

frek818 and others added 3 commits June 27, 2025 11:50
Co-authored-by: Brittan DeYoung <32572259+brittandeyoung@users.noreply.github.com>
Co-authored-by: Brittan DeYoung <32572259+brittandeyoung@users.noreply.github.com>
Co-authored-by: Brittan DeYoung <32572259+brittandeyoung@users.noreply.github.com>
@frek818
Copy link
Contributor Author

frek818 commented Jun 27, 2025

Thank you @brittandeyoung. Here are the acceptance test results.

$ make testacc TESTS=TestAccCloudFrontKeyValueStoreKeysExclusive_itemRemainsAfterValueChange PKG=cloudfrontkeyvaluestore

make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.24.4 test ./internal/service/cloudfrontkeyvaluestore/... -v -count 1 -parallel 20 -run='TestAccCloudFrontKeyValueStoreKeysExclusive_itemRemainsAfterValueChange'  -timeout 360m -
vet=off
2025/06/27 09:12:07 Creating Terraform AWS Provider (SDKv2-style)...
2025/06/27 09:12:07 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccCloudFrontKeyValueStoreKeysExclusive_itemRemainsAfterValueChange
=== PAUSE TestAccCloudFrontKeyValueStoreKeysExclusive_itemRemainsAfterValueChange
=== CONT  TestAccCloudFrontKeyValueStoreKeysExclusive_itemRemainsAfterValueChange
--- PASS: TestAccCloudFrontKeyValueStoreKeysExclusive_itemRemainsAfterValueChange (40.12s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/cloudfrontkeyvaluestore    40.256s

@brittandeyoung
Copy link
Collaborator

LGTM

make testacc TESTARGS='-run=TestAccCloudFrontKeyValueStoreKeysExclusive' PKG=cloudfrontkeyvaluestore 
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.24.4 test ./internal/service/cloudfrontkeyvaluestore/... -v -count 1 -parallel 20  -run=TestAccCloudFrontKeyValueStoreKeysExclusive -timeout 360m -vet=off
2025/06/27 12:57:41 Creating Terraform AWS Provider (SDKv2-style)...
2025/06/27 12:57:41 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccCloudFrontKeyValueStoreKeysExclusive_basic
=== PAUSE TestAccCloudFrontKeyValueStoreKeysExclusive_basic
=== RUN   TestAccCloudFrontKeyValueStoreKeysExclusive_disappears_KeyValueStore
=== PAUSE TestAccCloudFrontKeyValueStoreKeysExclusive_disappears_KeyValueStore
=== RUN   TestAccCloudFrontKeyValueStoreKeysExclusive_outOfBandAddition
=== PAUSE TestAccCloudFrontKeyValueStoreKeysExclusive_outOfBandAddition
=== RUN   TestAccCloudFrontKeyValueStoreKeysExclusive_outOfBandRemoval
=== PAUSE TestAccCloudFrontKeyValueStoreKeysExclusive_outOfBandRemoval
=== RUN   TestAccCloudFrontKeyValueStoreKeysExclusive_value
=== PAUSE TestAccCloudFrontKeyValueStoreKeysExclusive_value
=== RUN   TestAccCloudFrontKeyValueStoreKeysExclusive_empty
=== PAUSE TestAccCloudFrontKeyValueStoreKeysExclusive_empty
=== RUN   TestAccCloudFrontKeyValueStoreKeysExclusive_maxBatchSize
=== PAUSE TestAccCloudFrontKeyValueStoreKeysExclusive_maxBatchSize
=== RUN   TestAccCloudFrontKeyValueStoreKeysExclusive_itemRemainsAfterValueChange
=== PAUSE TestAccCloudFrontKeyValueStoreKeysExclusive_itemRemainsAfterValueChange
=== CONT  TestAccCloudFrontKeyValueStoreKeysExclusive_basic
=== CONT  TestAccCloudFrontKeyValueStoreKeysExclusive_value
=== CONT  TestAccCloudFrontKeyValueStoreKeysExclusive_outOfBandAddition
=== CONT  TestAccCloudFrontKeyValueStoreKeysExclusive_outOfBandRemoval
=== CONT  TestAccCloudFrontKeyValueStoreKeysExclusive_maxBatchSize
=== CONT  TestAccCloudFrontKeyValueStoreKeysExclusive_itemRemainsAfterValueChange
=== CONT  TestAccCloudFrontKeyValueStoreKeysExclusive_disappears_KeyValueStore
=== CONT  TestAccCloudFrontKeyValueStoreKeysExclusive_empty
--- PASS: TestAccCloudFrontKeyValueStoreKeysExclusive_disappears_KeyValueStore (32.54s)
--- PASS: TestAccCloudFrontKeyValueStoreKeysExclusive_value (41.92s)
--- PASS: TestAccCloudFrontKeyValueStoreKeysExclusive_outOfBandRemoval (43.64s)
--- PASS: TestAccCloudFrontKeyValueStoreKeysExclusive_outOfBandAddition (44.48s)
--- PASS: TestAccCloudFrontKeyValueStoreKeysExclusive_basic (45.28s)
--- PASS: TestAccCloudFrontKeyValueStoreKeysExclusive_maxBatchSize (45.35s)
--- PASS: TestAccCloudFrontKeyValueStoreKeysExclusive_itemRemainsAfterValueChange (48.62s)
--- PASS: TestAccCloudFrontKeyValueStoreKeysExclusive_empty (60.02s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/cloudfrontkeyvaluestore    65.958s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. service/cloudfrontkeyvaluestore Issues and PRs that pertain to the cloudfrontkeyvaluestore service. size/M Managed by automation to categorize the size of a PR. size/S 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.

aws_cloudfrontkeyvaluestore_keys_exclusive: modifying the value of resource_key_value_pair causes it to be deleted
2 participants