I use Terraform by Hashicorp to manage AWS infrastructure. Some migration tasks require renaming of several resources such as the db_option_group.
I have no clue why Terraform says "forces replacement" by just renaming the db_option_group. On the API documentation it says that "description" is an optional attribute and no replacement is required.
# module.db_instance.aws_db_option_group.db-option-group must be replaced
-/+ resource "aws_db_option_group" "db-option-group" {
~ arn = "arn:aws:rds:eu-central-1:xxxxxxxxxx:xx:xxxxx-xx-xxxx-cc01-sqlserver-se-14-00" -> (known after apply)
engine_name = "sqlserver-se"
~ id = "xxxxxx-xxx-xxxxx-cc01-sqlserver-se-14-00" -> (known after apply)
major_engine_version = "14.00"
name = "xxxxxx-xxx-xxxxx-cc01-sqlserver-se-14-00"
+ name_prefix = (known after apply)
~ option_group_description = "xxxxxx-xxx-xxxxx-cc01-sqlserver-se-14-00" -> "Option group for xxxxx-xxx-xxxxx-cc01" # forces replacement
~ tags = {
+ "Project" = "xxxxx"
+ "ProjectId" = "xxxxx"
+ "global.app" = "xxxxx"
+ "global.cbp" = "xxxxx"
+ "global.dcs" = "xxxxx"
+ "global.env" = "qa"
+ "global.opco" = "xxxxx"
+ "global.project" = "xxxxx"
}
What causes Terraform to behave like this?
option_group_description
argument is changed. I've seen this before for optional arguments for other resources. You should create a ticket with the aws provider to be certain. – SomeGuyOnAComputer