Terraform: Rds instance type not updating

Created on 30 Aug 2016  ยท  6Comments  ยท  Source: hashicorp/terraform

Hi All,

I have a basic "aws_db_instance" resource that I created using a certain instance type. I have since tried to change its instance type and it doesn't seem to be refreshing. Even though the apply output seems to suggest it has been changed.

Terraform Version

0.7.2

Affected Resource(s)

  • aws_db_instance

    Terraform Configuration Files

resource "aws_db_instance" "rds_mysql_database" {
  allocated_storage    = 10
  engine               = "mysql"
  instance_class       = "db.t2.micro"
  username             = "myadmin"
  password             = "${var.db_password}"
  db_subnet_group_name = "${aws_db_subnet_group.database_subnet_group.id}"
  multi_az = "false"
}

Output

The plan:

~ aws_db_instance.rds_mysql_database
    instance_class: "db.t1.micro" => "db.t2.micro"


Plan: 0 to add, 1 to change, 0 to destroy.

The apply:

aws_db_instance.rds_mysql_database: Modifying...
  instance_class: "db.t1.micro" => "db.t2.micro"
aws_db_instance.rds_mysql_database: Still modifying... (10s elapsed)
aws_db_instance.rds_mysql_database: Still modifying... (20s elapsed)
aws_db_instance.rds_mysql_database: Still modifying... (30s elapsed)
aws_db_instance.rds_mysql_database: Still modifying... (40s elapsed)
aws_db_instance.rds_mysql_database: Still modifying... (50s elapsed)
aws_db_instance.rds_mysql_database: Modifications complete

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

The state of your infrastructure has been saved to the path
below. This state is required to modify and destroy your
infrastructure, so keep it safe. To inspect the complete state
use the `terraform show` command.
bug provideaws

Most helpful comment

Hi @bernielomax

please can you tell me if you are using the apply_immediately flag?

Paul

All 6 comments

Hi @bernielomax

please can you tell me if you are using the apply_immediately flag?

Paul

Hey Paul (@stack72)

No I am not actually. Could that be it? The update request has been accepted and its now in the hands of AWS?

Hi @bernielomax

this is almost _Certainly_ the issue. If you do not supply that value, RDS will wait until the next maintenance window to apply the update. Therefore, when Terraform reads the current state of the infrastructure, it will see that it is still showing db.t1.micro and then believe it has to change it to db.t2.micro

Please read the documentation for the notes to be aware of when using apply_immediately

Let me know if this solves your issue

Paul

Hi @bernielomax

I haven't heard back from you on this - I am going to close this out for now. If this is still an issue then please do let me know

Paul

Is the requests queued up in Amazon RDS then? Where can we see this pending change?

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rkulagowski picture rkulagowski  ยท  3Comments

larstobi picture larstobi  ยท  3Comments

rjinski picture rjinski  ยท  3Comments

sprokopiak picture sprokopiak  ยท  3Comments

franklinwise picture franklinwise  ยท  3Comments