Terraform import doesn't import password for aws_db_instance AWS resource

Hello,

I’m finding that when using terraform import command to import an aws_db_instance AWS resource that it will not import the password, which is the master password into the state file. I’m using S3 for remote state file and using Terraform 0.11.14. Example of the import command used is below.

terraform import module.my_test_rds.aws_db_instance.my_test_rds my_test_rds

This did import successfully into the remote state file other than the missing password. When I run terraform plan against the new state file, the only change shows is the password since the password is not in the new state file.

Is this how terraform import works where it doesn’t import sensitive data, e.g., passwords or am I missing a step?

Thanks,
Mike

1 Like