Terraform asks for aws_db_parameter_group destroy

Hello,

I am trying to create an aurora-mysql AWS rds instance and when deploying it it throws:

# module.rds.module.db_parameter_group.aws_db_parameter_group.this[0] will be destroyed
  # (because aws_db_parameter_group.this is not in configuration)
  - resource "aws_db_parameter_group" "this" {
      - arn         = "arn:aws:rds:us-east-1:<ID>:pg:default.mysql8.0" -> null
      - description = "default.mysql8.0 parameter group" -> null
      - family      = "mysql8.0" -> null
      - id          = "default.mysql8.0" -> null
      - name        = "default.mysql8.0" -> null
      - tags        = {
          - "Name" = "default.mysql8.0"
        } -> null
      - tags_all    = {
          - "Name"     = "default.mysql8.0"
          - "Owner"    = "my tag"
          - "Team" = "My team"
        } -> null
    }

since this is a default parameter, I cannot proceed with the apply. How can I bypass this? Worth mentioning is that I am not using at all this parameter group.

Another thing worth mentioning is that before trying to deploy an amazon rds aurora instance I tried to deploy an AWS RDS MySql instance(not aurora) and the group might have been created from there?

Thank you

Hi @unknowntester10,

If you want this object to keep existing in AWS but you do not want Terraform to manage it, you can ask Terraform to “forget” this object:

terraform state rm aws_db_parameter_group.this[0]

Depending on which operating system and shell you are using to run this command, you may need to place the last argument in quotes to avoid the brackets being interpreted by the shell instead of by Terraform.