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]: aws_docdb_cluster "unsupported attribute" error for documented attribute "allow-major-version-upgrade" #33764

Closed
mschalasani opened this issue Oct 4, 2023 · 3 comments · Fixed by #33790
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/docdb Issues and PRs that pertain to the docdb service.
Milestone

Comments

@mschalasani
Copy link

mschalasani commented Oct 4, 2023

Terraform Core Version

1.5.5

AWS Provider Version

5.19.0

Affected Resource(s)

aws_docdb_cluster

Expected Behavior

When we try to perform an upgrade on a regional cluster without a mention of allow-major-version-upgrade field we get the below error

Error: modifying DocumentDB Cluster (ss-ddd-tes1-aaa-docdb-primary-cluster): InvalidParameterCombination: The AllowMajorVersionUpgrade flag must be present when upgrading to a new major version

And when we give allow-major-version-upgrade = true in the aws_docdb_cluster we get the below error


│ Error: Unsupported argument

│ on modules/docdb/docdb_primary.tf line 23, in resource "aws_docdb_cluster" "primary_cluster":
│ 23: allow_major_version_upgrade = true

│ An argument named "allow_major_version_upgrade" is not expected here.

Actual Behavior

When we try to perform an upgrade on a regional cluster without a mention of allow-major-version-upgrade field we get the below error

Error: modifying DocumentDB Cluster (ss-ddd-tes1-aaa-docdb-primary-cluster): InvalidParameterCombination: The AllowMajorVersionUpgrade flag must be present when upgrading to a new major version

And when we give allow-major-version-upgrade = true in the aws_docdb_cluster we get the below error


│ Error: Unsupported argument

│ on modules/docdb/docdb_primary.tf line 23, in resource "aws_docdb_cluster" "primary_cluster":
│ 23: allow_major_version_upgrade = true

│ An argument named "allow_major_version_upgrade" is not expected here.

Relevant Error/Panic Output Snippet

We are unable to perform upgrade of documentdb from version 4.0.0 to 5.0.0 using terraform. The error says allow_major_version_upgrade is needed for upgrade . And when its coded we get the message that allow_major_version_upgrade is unknown.

Terraform Configuration Files

resource "aws_docdb_cluster" "primary_cluster" {
db_subnet_group_name = aws_docdb_subnet_group.primary_subnet.name
cluster_identifier = var.primary_cluster_name
engine = var.engine
master_username = var.master_username
master_password = var.master_password
db_cluster_parameter_group_name = aws_docdb_cluster_parameter_group.primary_db_param_group5.name
vpc_security_group_ids = var.primary_security_group_ids
engine_version = "5.0.0"
storage_encrypted = true
port = 27017
apply_immediately = var.apply_immediately
skip_final_snapshot = true
enabled_cloudwatch_logs_exports = ["audit", "profiler"]
kms_key_id = var.primary_kms_key
allow_major_version_upgrade = true
}

Steps to Reproduce

terraform apply

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No

@mschalasani mschalasani added the bug Addresses a defect in current functionality. label Oct 4, 2023
@github-actions
Copy link

github-actions bot commented Oct 4, 2023

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/docdb Issues and PRs that pertain to the docdb service. label Oct 4, 2023
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Oct 4, 2023
@mschalasani mschalasani changed the title [Bug]: [Bug]: aws_docdb_cluster "unsupported attribute" error for documented attribute "allow-major-version-upgrade" Oct 4, 2023
@ewbankkit ewbankkit added enhancement Requests to existing resources that expand the functionality or scope. and removed bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Oct 6, 2023
@github-actions github-actions bot added this to the v5.21.0 milestone Oct 11, 2023
@github-actions
Copy link

This functionality has been released in v5.21.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 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/docdb Issues and PRs that pertain to the docdb service.
Projects
None yet
2 participants