-
Notifications
You must be signed in to change notification settings - Fork 9.9k
r/aws_rds_global_cluster: fix minor version upgrade workflow #45605
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
jar-b
wants to merge
2
commits into
main
Choose a base branch
from
b-rds_global_cluster-minor-upgrade
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+15
−8
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Community GuidelinesThis 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
Pull Request Authors
|
19ddbd3 to
9678c5b
Compare
This addresses a regression caused by a change in the text of the `InvalidParameterValue` exception returned by the AWS API when a minor version upgrade is attempted on the global cluster. The provider does not attempt to parse various engine version combinations, and instead always first attempts a major version upgrade before falling back to a minor version upgrade when specific error text is received. The upstream change in message caused this mechanism to break. Updating the expected message text restores the intended behavior.
Before:
```console
% make t K=rds T=TestAccRDSGlobalCluster_EngineVersion_updateMinor
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 tmp2 🌿...
TF_ACC=1 go1.24.11 test ./internal/service/rds/... -v -count 1 -parallel 20 -run='TestAccRDSGlobalCluster_EngineVersion_updateMinor' -timeout 360m -vet=off
2025/12/15 13:37:39 Creating Terraform AWS Provider (SDKv2-style)...
2025/12/15 13:37:39 Initializing Terraform AWS Provider (SDKv2-style)...
=== NAME TestAccRDSGlobalCluster_EngineVersion_updateMinor
global_cluster_test.go:279: Step 2/3 error: Error running apply: exit status 1
Error: upgrading major version of RDS Global Cluster (tf-acc-test-8163082142476779811): modifying RDS Global Cluster (tf-acc-test-8163082142476779811) EngineVersion: operation error RDS: ModifyGlobalCluster, https response error StatusCode: 400, RequestID: e2c33581-584e-4bae-8f20-ffddca8ccaf9, api error InvalidParameterValue: ModifyGlobalCluster doesn't support minor version upgrades for Aurora global databases. To upgrade to a newer minor version, call ModifyDBCluster for each member of your global cluster.
with aws_rds_global_cluster.test,
on terraform_plugin_test.tf line 44, in resource "aws_rds_global_cluster" "test":
44: resource "aws_rds_global_cluster" "test" {
=== NAME TestAccRDSGlobalCluster_EngineVersion_updateMinorMultiRegion
global_cluster_test.go:365: Step 2/2 error: Error running apply: exit status 1
Error: upgrading major version of RDS Global Cluster (tf-acc-test-6322879870747030243): modifying RDS Global Cluster (tf-acc-test-6322879870747030243) EngineVersion: operation error RDS: ModifyGlobalCluster, https response error StatusCode: 400, RequestID: 9ae57ef4-ff0e-4076-be38-49c9fef642a6, api error InvalidParameterValue: ModifyGlobalCluster doesn't support minor version upgrades for Aurora global databases. To upgrade to a newer minor version, call ModifyDBCluster for each member of your global cluster.
with aws_rds_global_cluster.test,
on terraform_plugin_test.tf line 63, in resource "aws_rds_global_cluster" "test":
63: resource "aws_rds_global_cluster" "test" {
--- FAIL: TestAccRDSGlobalCluster_EngineVersion_updateMinor (6492.85s)
--- FAIL: TestAccRDSGlobalCluster_EngineVersion_updateMinorMultiRegion (8039.50s)
FAIL
FAIL github.com/hashicorp/terraform-provider-aws/internal/service/rds 8046.072s
```
After:
```console
% make t K=rds T='^TestAccRDSGlobalCluster_EngineVersion_updateMinor$$'
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 tmp2 🌿...
TF_ACC=1 go1.24.11 test ./internal/service/rds/... -v -count 1 -parallel 20 -run='^TestAccRDSGlobalCluster_EngineVersion_updateMinor$' -timeout 360m -vet=off
2025/12/15 16:08:30 Creating Terraform AWS Provider (SDKv2-style)...
2025/12/15 16:08:30 Initializing Terraform AWS Provider (SDKv2-style)...
--- PASS: TestAccRDSGlobalCluster_EngineVersion_updateMinor (6794.77s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/rds 6801.457s
```
```console
% make t K=rds T="TestAccRDSGlobalCluster_"
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 b-rds_global_cluster-minor-upgrade 🌿...
TF_ACC=1 go1.24.11 test ./internal/service/rds/... -v -count 1 -parallel 20 -run='TestAccRDSGlobalCluster_' -timeout 360m -vet=off
2025/12/16 10:06:37 Creating Terraform AWS Provider (SDKv2-style)...
2025/12/16 10:06:37 Initializing Terraform AWS Provider (SDKv2-style)...
--- PASS: TestAccRDSGlobalCluster_disappears (33.89s)
=== CONT TestAccRDSGlobalCluster_tags_EmptyTag_OnUpdate_Add
=== NAME TestAccRDSGlobalCluster_storageEncrypted
global_cluster_test.go:602: Step 3/3 error: Error running apply: exit status 1
Error: creating RDS Global Cluster (tf-acc-test-3117278625220647550): operation error RDS: CreateGlobalCluster, https response error StatusCode: 400, RequestID: b23e02ea-13d3-46aa-8d7b-d2e2cf40dbbe, GlobalClusterAlreadyExistsFault: Global cluster tf-acc-test-3117278625220647550 already exists
with aws_rds_global_cluster.test,
on terraform_plugin_test.tf line 12, in resource "aws_rds_global_cluster" "test":
12: resource "aws_rds_global_cluster" "test" {
--- FAIL: TestAccRDSGlobalCluster_storageEncrypted (42.92s)
=== CONT TestAccRDSGlobalCluster_EngineVersion_updateMajor
--- PASS: TestAccRDSGlobalCluster_tags_DefaultTags_nullNonOverlappingResourceTag (43.70s)
=== CONT TestAccRDSGlobalCluster_tags_DefaultTags_overlapping
--- PASS: TestAccRDSGlobalCluster_tags_DefaultTags_nullOverlappingResourceTag (43.74s)
=== CONT TestAccRDSGlobalCluster_EngineVersion_updateMinorMultiRegion
--- PASS: TestAccRDSGlobalCluster_tags_DefaultTags_emptyProviderOnlyTag (44.10s)
=== CONT TestAccRDSGlobalCluster_tags_DefaultTags_nonOverlapping
--- PASS: TestAccRDSGlobalCluster_tags_DefaultTags_emptyResourceTag (44.43s)
=== CONT TestAccRDSGlobalCluster_tags_DefaultTags_providerOnly
--- PASS: TestAccRDSGlobalCluster_tags_ComputedTag_OnCreate (46.37s)
=== CONT TestAccRDSGlobalCluster_tags_EmptyTag_OnUpdate_Replace
--- PASS: TestAccRDSGlobalCluster_databaseName (61.82s)
=== CONT TestAccRDSGlobalCluster_tags_IgnoreTags_Overlap_ResourceTag
--- PASS: TestAccRDSGlobalCluster_tags_DefaultTags_updateToResourceOnly (67.45s)
=== CONT TestAccRDSGlobalCluster_basic
--- PASS: TestAccRDSGlobalCluster_tags_DefaultTags_updateToProviderOnly (69.06s)
=== CONT TestAccRDSGlobalCluster_tags_AddOnUpdate
--- PASS: TestAccRDSGlobalCluster_tags_ComputedTag_OnUpdate_Replace (72.44s)
=== CONT TestAccRDSGlobalCluster_tags_EmptyMap
--- PASS: TestAccRDSGlobalCluster_tags_ComputedTag_OnUpdate_Add (72.79s)
=== CONT TestAccRDSGlobalCluster_tags_EmptyTag_OnCreate
--- PASS: TestAccRDSGlobalCluster_tags_IgnoreTags_Overlap_DefaultTag (80.97s)
=== CONT TestAccRDSGlobalCluster_EngineVersion_auroraPostgreSQL
--- PASS: TestAccRDSGlobalCluster_deletionProtection (87.53s)
=== CONT TestAccRDSGlobalCluster_forceDestroy
--- PASS: TestAccRDSGlobalCluster_basic (30.16s)
=== CONT TestAccRDSGlobalCluster_EngineVersion_auroraMySQL
--- PASS: TestAccRDSGlobalCluster_tags_EmptyTag_OnUpdate_Replace (58.83s)
=== CONT TestAccRDSGlobalCluster_tags_null
--- PASS: TestAccRDSGlobalCluster_forceDestroy (22.88s)
=== CONT TestAccRDSGlobalCluster_EngineVersion_updateMinor
--- PASS: TestAccRDSGlobalCluster_EngineVersion_auroraPostgreSQL (30.56s)
=== CONT TestAccRDSGlobalCluster_engineLifecycleSupport_disabled
--- PASS: TestAccRDSGlobalCluster_tags_EmptyMap (46.40s)
--- PASS: TestAccRDSGlobalCluster_tags_AddOnUpdate (52.32s)
--- PASS: TestAccRDSGlobalCluster_tags_EmptyTag_OnUpdate_Add (87.55s)
--- PASS: TestAccRDSGlobalCluster_EngineVersion_auroraMySQL (28.41s)
--- PASS: TestAccRDSGlobalCluster_tags (127.37s)
--- PASS: TestAccRDSGlobalCluster_tags_EmptyTag_OnCreate (55.86s)
--- PASS: TestAccRDSGlobalCluster_tags_DefaultTags_nonOverlapping (87.05s)
--- PASS: TestAccRDSGlobalCluster_tags_DefaultTags_overlapping (88.60s)
--- PASS: TestAccRDSGlobalCluster_engineLifecycleSupport_disabled (22.33s)
--- PASS: TestAccRDSGlobalCluster_tags_IgnoreTags_Overlap_ResourceTag (73.65s)
--- PASS: TestAccRDSGlobalCluster_tags_null (34.70s)
--- PASS: TestAccRDSGlobalCluster_tags_DefaultTags_providerOnly (102.82s)
--- PASS: TestAccRDSGlobalCluster_SourceDBClusterIdentifier_databaseName (194.43s)
--- PASS: TestAccRDSGlobalCluster_SourceDBClusterIdentifier_storageEncrypted (204.01s)
--- PASS: TestAccRDSGlobalCluster_sourceDBClusterIdentifier (204.54s)
--- PASS: TestAccRDSGlobalCluster_SourceDBClusterIdentifier_EngineVersion_updateMajor (1685.84s)
--- PASS: TestAccRDSGlobalCluster_EngineVersion_updateMajor (1724.32s)
--- PASS: TestAccRDSGlobalCluster_EngineVersion_updateMajorMultiRegion (3442.45s)
--- PASS: TestAccRDSGlobalCluster_EngineVersion_updateMinor (6766.50s)
--- PASS: TestAccRDSGlobalCluster_EngineVersion_updateMinorMultiRegion (8361.36s)
FAIL
FAIL github.com/hashicorp/terraform-provider-aws/internal/service/rds 8411.788s
```
Failure is unrelated to this change.
badf3dd to
eaad67a
Compare
Before:
```console
% make t K=neptune T=TestAccNeptuneGlobalCluster_EngineVersion
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 b-rds_global_cluster-minor-upgrade 🌿...
TF_ACC=1 go1.24.11 test ./internal/service/neptune/... -v -count 1 -parallel 20 -run='TestAccNeptuneGlobalCluster_EngineVersion' -timeout 360m -vet=off
2025/12/16 13:03:22 Creating Terraform AWS Provider (SDKv2-style)...
2025/12/16 13:03:22 Initializing Terraform AWS Provider (SDKv2-style)...
=== CONT TestAccNeptuneGlobalCluster_EngineVersion
global_cluster_test.go:192: Step 3/3 error: Error running apply: exit status 1
Error: updating Neptune Global Cluster (tf-acc-test-3765173842018519187): upgrading major version of Neptune Global Cluster (tf-acc-test-3765173842018519187): modifying Neptune Global Cluster (tf-acc-test-3765173842018519187) EngineVersion: operation error Neptune: ModifyGlobalCluster, https response error StatusCode: 400, RequestID: 03ab793b-32a9-4300-bc57-5c064dd934ea, api error InvalidParameterValue: ModifyGlobalCluster doesn't support minor version upgrades for Aurora global databases. To upgrade to a newer minor version, call ModifyDBCluster for each member of your global cluster.
with aws_neptune_global_cluster.test,
on terraform_plugin_test.tf line 12, in resource "aws_neptune_global_cluster" "test":
12: resource "aws_neptune_global_cluster" "test" {
--- FAIL: TestAccNeptuneGlobalCluster_EngineVersion (8495.13s)
FAIL
FAIL github.com/hashicorp/terraform-provider-aws/internal/service/neptune 8501.640s
```
After:
```console
% make t K=neptune T=TestAccNeptuneGlobalCluster_EngineVersion
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 b-rds_global_cluster-minor-upgrade 🌿...
TF_ACC=1 go1.24.11 test ./internal/service/neptune/... -v -count 1 -parallel 20 -run='TestAccNeptuneGlobalCluster_EngineVersion' -timeout 360m -vet=off
2025/12/16 16:17:30 Creating Terraform AWS Provider (SDKv2-style)...
2025/12/16 16:17:30 Initializing Terraform AWS Provider (SDKv2-style)...
--- PASS: TestAccNeptuneGlobalCluster_EngineVersion (1626.64s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/neptune 1633.302s
```
```console
% make t K=neptune T=TestAccNeptuneGlobalCluster_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 b-rds_global_cluster-minor-upgrade 🌿...
TF_ACC=1 go1.24.11 test ./internal/service/neptune/... -v -count 1 -parallel 20 -run='TestAccNeptuneGlobalCluster_' -timeout 360m -vet=off
2025/12/16 19:15:55 Creating Terraform AWS Provider (SDKv2-style)...
2025/12/16 19:15:55 Initializing Terraform AWS Provider (SDKv2-style)...
--- PASS: TestAccNeptuneGlobalCluster_disappears (17.73s)
--- PASS: TestAccNeptuneGlobalCluster_Engine (20.08s)
--- PASS: TestAccNeptuneGlobalCluster_basic (20.77s)
=== NAME TestAccNeptuneGlobalCluster_StorageEncrypted
global_cluster_test.go:288: Step 3/3 error: Error running apply: exit status 1
Error: creating Neptune Global Cluster (tf-acc-test-2932884454474243149): operation error Neptune: CreateGlobalCluster, https response error StatusCode: 400, RequestID: 617a4407-8b3f-408b-b42b-302da2e46644, GlobalClusterAlreadyExistsFault: Global cluster tf-acc-test-2932884454474243149 already exists
with aws_neptune_global_cluster.test,
on terraform_plugin_test.tf line 12, in resource "aws_neptune_global_cluster" "test":
12: resource "aws_neptune_global_cluster" "test" {
--- FAIL: TestAccNeptuneGlobalCluster_StorageEncrypted (22.69s)
--- PASS: TestAccNeptuneGlobalCluster_DeletionProtection (61.67s)
--- PASS: TestAccNeptuneGlobalCluster_completeBasic (102.28s)
--- PASS: TestAccNeptuneGlobalCluster_SourceDBClusterIdentifier_basic (143.06s)
--- PASS: TestAccNeptuneGlobalCluster_SourceDBClusterIdentifier_storageEncrypted (151.72s)
--- PASS: TestAccNeptuneGlobalCluster_EngineVersion (1584.84s)
FAIL
FAIL github.com/hashicorp/terraform-provider-aws/internal/service/neptune 1591.365s
```
Failure is pre-existing and unrelated to this change.
eaad67a to
389cf4b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
prioritized
Part of the maintainer teams immediate focus. To be addressed within the current quarter.
service/neptune
Issues and PRs that pertain to the neptune service.
service/rds
Issues and PRs that pertain to the rds service.
size/XS
Managed by automation to categorize the size of a PR.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the library.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
Description
This addresses a regression caused by a change in the text of the
InvalidParameterValueexception returned by the AWS API when a minor version upgrade is attempted on the global cluster. The provider does not attempt to parse various engine version combinations, and instead always first attempts a major version upgrade before falling back to a minor version upgrade when specific error text is received. The upstream change in message caused this mechanism to break. Updating the expected message text restores the intended behavior.Before:
After:
Relations
Closes #45398
Output from Acceptance Testing