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

r/aws_elasticache_replication_group: Fix error marshaling prior state when upgrading from v4.67.0 to v5.59.0 #38476

Merged

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Jul 22, 2024

Description

The v4.67.0 schema contained block attribute named cluster_mode which was removed at v5.0.0.
The v5.59.0 schema introduced a new string attribute named cluster_mode.
This caused an error when upgrading state from v4.67.0 to v5.59.0.

Relations

Closes #38464.

Output from Acceptance Testing

% ACCTEST_TIMEOUT=1080m make testacc TESTARGS='-run=TestAccElastiCacheReplicationGroup_stateUpgrade5590' PKG=elasticache
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.5 test ./internal/service/elasticache/... -v -count 1 -parallel 20  -run=TestAccElastiCacheReplicationGroup_stateUpgrade5590 -timeout 1080m
=== RUN   TestAccElastiCacheReplicationGroup_stateUpgrade5590
=== PAUSE TestAccElastiCacheReplicationGroup_stateUpgrade5590
=== CONT  TestAccElastiCacheReplicationGroup_stateUpgrade5590
--- PASS: TestAccElastiCacheReplicationGroup_stateUpgrade5590 (660.31s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/elasticache	665.302s
% ACCTEST_TIMEOUT=1080m make testacc TESTARGS='-run=TestAccElastiCacheReplicationGroup_stateUpgrade5270' PKG=elasticache
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.5 test ./internal/service/elasticache/... -v -count 1 -parallel 20  -run=TestAccElastiCacheReplicationGroup_stateUpgrade5270 -timeout 1080m
=== RUN   TestAccElastiCacheReplicationGroup_stateUpgrade5270
=== PAUSE TestAccElastiCacheReplicationGroup_stateUpgrade5270
=== CONT  TestAccElastiCacheReplicationGroup_stateUpgrade5270
--- PASS: TestAccElastiCacheReplicationGroup_stateUpgrade5270 (872.26s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/elasticache	877.202s

@ewbankkit ewbankkit requested a review from a team as a code owner July 22, 2024 21:44
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@terraform-aws-provider terraform-aws-provider bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/elasticache Issues and PRs that pertain to the elasticache service. size/L Managed by automation to categorize the size of a PR. labels Jul 22, 2024
Copy link

Thank you for your contribution! 🚀

A new usage of AWS SDK for Go V1 was detected. Please prefer AWS SDK for Go V2 for all net-new services. If this is an enhancement or bug fix to an existing AWS SDK Go V1 based resource, this comment can be safely ignored.

For additional information refer to the AWS SDK for Go Versions page in the contributor guide.

@ewbankkit ewbankkit changed the title [WIP] r/aws_elasticache_replication_group: Fix error marshaling prior state when upgrading from v4.67.0 to v5.59.0 r/aws_elasticache_replication_group: Fix error marshaling prior state when upgrading from v4.67.0 to v5.59.0 Jul 22, 2024
Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@ewbankkit ewbankkit merged commit ae85642 into main Jul 23, 2024
41 checks passed
@ewbankkit ewbankkit deleted the b-aws_elasticache_replication_group-state-migration-regression branch July 23, 2024 14:25
@github-actions github-actions bot added this to the v5.60.0 milestone Jul 23, 2024
terraform-aws-provider bot pushed a commit that referenced this pull request Jul 23, 2024
@jgrumboe
Copy link

Thanks @ewbankkit! That was quick! 🚀

Copy link

This functionality has been released in v5.60.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. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/elasticache Issues and PRs that pertain to the elasticache 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.

[Bug]: Failed to marshal plan to json: eror marshaling prior state
3 participants