skip to Main Content

I have a deployment with an rds database. Initially we set the iam_database_authentication_enabled to false then run a script setting the database up along with giving the database user the rds_iam role. After that we run apply once more but with iam_database_authentication_enabled set to true. This is achieved by having two .tfvars files. Problem is, the iam_database_authentication_enabled is never updated in AWS. I can see when running terraform plan that the field will be updated but in fact it never is. What am I doing wrong here?

3

Answers


  1. Chosen as BEST ANSWER

    Found a way around it using aws cli:

    aws rds modify-db-instance 
      --db-instance-identifier mydbinstance 
      --apply-immediately 
      --enable-iam-database-authentication
    

  2. It will likely be applied in the next rds maintenance window. But if you want to apply immediately, you can use Terraform argument:

    apply_immediately = true
    
    Login or Signup to reply.
  3. It sounds like you didn’t set the apply_immediately attribute to true in your aws_db_instance Terraform code. If you didn’t set that, then the setting will be changed in AWS, but not applied to the running database instance until the next restart.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search