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

[Bug]: r/aws_neptune_cluster_instance: engine_version parameter should be ignored #33467

Closed
triggan opened this issue Sep 14, 2023 · 4 comments · Fixed by #33487
Closed

[Bug]: r/aws_neptune_cluster_instance: engine_version parameter should be ignored #33467

triggan opened this issue Sep 14, 2023 · 4 comments · Fixed by #33487
Labels
bug Addresses a defect in current functionality. service/neptune Issues and PRs that pertain to the neptune service.
Milestone

Comments

@triggan
Copy link
Contributor

triggan commented Sep 14, 2023

Terraform Core Version

1.5.7

AWS Provider Version

5.16.2

Affected Resource(s)

  • aws_neptune_cluster_instance

Expected Behavior

If a user currently provides the engine_version parameter on an aws_neptune_cluster_instance resource and then goes to perform an engine upgrade of the hosting aws_neptune_cluster that owns that instance, Terraform forces an instance replacement for any affected instances in that cluster.

Engine version upgrades in Neptune are handled at a cluster level, and not at an instance level. All instances in a cluster are required (and forced) to be on the same engine version as the hosting cluster. Upon an engine version upgrade, Neptune will push the latest engine code to each instance and force a reboot of each instance. There is no present requirement to replace all instances in a cluster when performing an engine upgrade.

Per the AWS CLI man page for aws neptune create-db-instance and aws neptune modify-db-instance, the --engine-version parameter is listed as:

       --engine-version (string)
          The version number of the database engine to upgrade to. Currently,
          setting this parameter has no effect. To upgrade your database
          engine to the most recent release, use the
          ApplyPendingMaintenanceAction API.

As such, the aws_neptune_cluster_instance resource schema needs to be altered to mirror this lack of constraint.

Actual Behavior

The current functionality forces an instance replacement after changing the engine_version parameter on both a cluster and all affected instances within the cluster.

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

Initial configuration file:

resource "aws_neptune_cluster" "new_cluster" {
  cluster_identifier = "neptunetestcluster"
  storage_encrypted = true
  engine_version = "1.2.0.1"
  skip_final_snapshot = true
  neptune_cluster_parameter_group_name = "default.neptune1.2"
}

resource "aws_neptune_cluster_instance" "new_instance_1" {
  cluster_identifier = aws_neptune_cluster.new_cluster.id
  engine             = "neptune"
  instance_class     = "db.r5.large"
  engine_version = "1.2.0.1"
  neptune_parameter_group_name = "default.neptune1.2"
}

Steps to Reproduce

After the initial apply, change the engine_version parameters for both resources to 1.2.0.2 and notice that Terraform is asking for the instance to be destroyed and replaced.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

Yes

@triggan triggan added the bug Addresses a defect in current functionality. label Sep 14, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/neptune Issues and PRs that pertain to the neptune service. label Sep 14, 2023
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Sep 14, 2023
@justinretzolk
Copy link
Member

Related #29785

@github-actions
Copy link

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

Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 20, 2023
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. service/neptune Issues and PRs that pertain to the neptune service.
Projects
None yet
2 participants