I am trying to upgrade documentdb global cluster from version 4.0.0 to 5.0.0 and am getting the following error
Error: failed to update engine_version on global cluster member (arn:aws:rds:us-east-1:085014367874:cluster:sf-dex-test1-sara-docdb-primary-cluster): InvalidParameterValue: Invalid database cluster identifier: arn:aws:rds:us-east-1:1234567890:cluster:aa-test-ara-docdb-primary-cluster
│ status code: 400, request id: abe68e5a-69be-4eb7-8e42-f72f773b12a7
I have added the lifecycle ignore_changes too.
Please help !
How is your documentdb is defined in terraform and what did you change to proceed with upgrade ?
Configuring remote state backend…
100Initializing Terraform configuration…
101╷
102│ Error: Unsupported argument
103│
104│ on modules/docdb/docdb_primary.tf line 23, in resource “aws_docdb_cluster” “primary_cluster”:
105│ 23: allow_major_version_upgrade = true
106│
107│ An argument named “allow_major_version_upgrade” is not expected here.
108╵
resource “aws_docdb_cluster” “primary_cluster” {
provider = aws.primary
/* global_cluster_identifier = aws_docdb_global_cluster.docdb_global.id*/
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 = var.engine_version
allow_major_version_upgrade = true
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
I am upgrading from version 4.0.0 to 5.0.0 . terraform is not accepting the key word
allow_major_version_upgrade . I am runnnng this using hashicorp/aws Version “~>5.19.0”