hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.74k stars 9.1k forks source link

[Bug]: r/aws_neptune_cluster and r/aws_neptune_cluster_instance use incorrect default parameter group families #38979

Closed triggan closed 3 weeks ago

triggan commented 3 weeks ago

Terraform Core Version

1.9.4

AWS Provider Version

5.63.1

Affected Resource(s)

Expected Behavior

For aws_neptune_cluster and aws_neptune_cluster_instance, if you do not specify a value for neptune_cluster_parameter_group_name and neptune_parameter_group_name respectively, then the default behavior is for the Neptune control plane to provide the appropriate default parameter group with the appropriate default parameter group family.

For example, if deploying the current default engine version for a Neptune cluster (1.3.2.1), then control plane will automatically use default.neptune1.3 as the default parameter group is none is specified.

Actual Behavior

In version 5.63.1 and earlier of the Terraform AWS provider, the default parameter group was provided of default.neptune1. This parameter group will not work for engine version beyond 1.1.1.0 and caused deployment failures when attempting to launch Neptune clusters without specifying a custom parameter group.

Relevant Error/Panic Output Snippet

aws_neptune_cluster.new_cluster: Creating...
╷
│ Error: creating Neptune Cluster (tf-20240822002802218600000001): InvalidParameterCombination: 
The Parameter Group default.neptune1 with DBParameterGroupFamily neptune1 
cannot be used for this instance. 
Please use a Parameter Group with DBParameterGroupFamily neptune1.3
│       status code: 400, request id: c246928a-c540-482f-874b-fa9ad714022e
│ 
│   with aws_neptune_cluster.new_cluster,
│   on main.tf line 14, in resource "aws_neptune_cluster" "new_cluster":
│   14: resource "aws_neptune_cluster" "new_cluster" {
│ 
╵

Terraform Configuration Files

resource "aws_neptune_cluster" "new_cluster" { engine = "neptune" backup_retention_period = 5 preferred_backup_window = "07:00-09:00" skip_final_snapshot = true }

Steps to Reproduce

When creating a new Neptune cluster without specifying engine_version or neptune_cluster_parameter_group_name, the default behavior by the AWS APIs for CreateDBCluster would create a new cluster with engine version 1.3.2.1 and a default parameter group of default.neptune1.3. Instead, the configuration above attempts to create a new cluster with engine version 1.3.2.1 (which is correct) but with a default parameter group of default.neptune1 (which is incorrect).

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

Would you like to implement a fix?

Yes

github-actions[bot] commented 3 weeks ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

github-actions[bot] commented 3 weeks ago

[!WARNING] This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

github-actions[bot] commented 2 weeks ago

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