Ed Merrett
07/29/2025, 3:59 PMPlanning failed. Terraform encountered an error while generating this plan.
╷
│ Error: Invalid function argument
│
│ on .terraform/modules/fleet.byo-vpc.rds/main.tf line 136, in resource "aws_rds_cluster" "this":
│ 136: for_each = length(var.serverlessv2_scaling_configuration) > 0 && var.engine_mode == "provisioned" ? [var.serverlessv2_scaling_configuration] : []
│ ├────────────────
│ │ while calling length(value)
│ │ var.serverlessv2_scaling_configuration is null
│
│ Invalid value for "value" parameter: argument must not be null.
Any ideas here? We are not explicitly setting the serverless vars, happy to accept the default in the byo-vpc moduleEd Merrett
07/29/2025, 4:00 PMMatt Rebelo
07/29/2025, 4:53 PMJorge Falcon
07/29/2025, 7:16 PMEd Merrett
07/29/2025, 7:17 PMJorge Falcon
07/29/2025, 7:46 PMEd Merrett
07/29/2025, 7:58 PMEd Merrett
07/29/2025, 8:06 PMError: Cannot import non-existent remote object
│
│ While attempting to import an existing object to "module.fleet.module.byo-vpc.module.byo-db.module.ecs.aws_ecs_task_definition.backend", the provider detected that
│ no object exists with the given id. Only pre-existing objects can be imported; check that the id is correct and that it is associated with the provider's configured
│ region or endpoint, or use "terraform apply" to create a new remote object for this resource.
Jorge Falcon
07/29/2025, 8:15 PMEd Merrett
07/29/2025, 8:16 PMEd Merrett
07/29/2025, 8:17 PMJorge Falcon
07/29/2025, 8:19 PMJorge Falcon
07/29/2025, 8:21 PMterraform apply
or were you trying to terraform import module.fleet.module.byo-vpc.module.byo-db.module.ecs.aws_ecs_task_definition.backend <task-definition-id>
or something else?Ed Merrett
07/29/2025, 8:22 PMJorge Falcon
07/29/2025, 8:22 PMEd Merrett
07/29/2025, 8:22 PMmodule.fleet.module.byo-vpc.module.byo-db.module.ecs.aws_ecs_task_definition.backend: Destroying... [id=fleet]
module.fleet.module.byo-vpc.module.byo-db.module.ecs.aws_ecs_task_definition.backend: Destruction complete after 0s
module.fleet.module.byo-vpc.module.rds.aws_rds_cluster.this[0]: Modifying... [id=fleet]
╷
│ Error: updating RDS Cluster (fleet): InvalidParameterCombination: Cannot upgrade aurora-mysql from 8.0.mysql_aurora.3.08.2 to 8.0.mysql_aurora.3.07.1
│ status code: 400, request id: b801e644-0984-43a0-a3bd-c8e0703d1adf
│
│ with module.fleet.module.byo-vpc.module.rds.aws_rds_cluster.this[0],
│ on .terraform/modules/fleet.byo-vpc.rds/main.tf line 61, in resource "aws_rds_cluster" "this":
│ 61: resource "aws_rds_cluster" "this" {
│
when trying to upgrade using tf-mod-root 15.2Jorge Falcon
07/29/2025, 8:27 PM8.0.mysql_aurora.3.08.2
as the engine_version.
tf-mod-root-v1.16.1
and later should default to 8.0.mysql_aurora.3.08.2
. The other alternative is that you can explicitly define it in your module.fleet.rds_config under engine_version
- https://github.com/fleetdm/fleet-terraform/blob/tf-mod-root-v1.16.2/example/main.tf#L105Jorge Falcon
07/29/2025, 8:29 PM8.0.mysql_aurora.3.08.2
already, but you may want to double check. The AWS terraform provider does not try to do an in-place upgrade, if the version is bumped up.
I would just double check that the engine_version defined in the terraform matches the engine_version in awsEd Merrett
07/29/2025, 8:29 PMJorge Falcon
07/29/2025, 8:33 PMterraform apply -target=module.fleet.module.byo-vpc.module.byo-db.module.ecs.aws_ecs_task_definition.backend
, if the task definition is the only issueEd Merrett
07/29/2025, 8:38 PMJorge Falcon
07/29/2025, 8:39 PMMatt Rebelo
07/29/2025, 8:41 PM