Help us understand the problem. What is going on with this article?

terraformでRDSをさわるときに忘れがちな事

More than 5 years have passed since last update.

TerraformでRDSを設定していた時に漏れてた事をメモ

backup_retention_period が反映されない

Backup保持期間を7にしたかった。
下記のように設定すると反映されない。

rds.tf
resource "aws_db_instance" "rds-setup" {
〜中略〜
  backup_retention_period = "7"
  backup_window = "22:29-22:59"
}

apply_immediatelyが足りていなかったので下記に編集

rds.tf
resource "aws_db_instance" "rds-setup" {
〜中略〜
  backup_retention_period = "7"
  backup_window = "22:29-22:59"
  apply_immediately = "true"
}

apply_immediatelyをtrueにした場合apply後にrebootになるので注意

参考URL:
TERRAFORMドキュメント

kt_higa
基本的にメモ置き場
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away