Terraform will perform the following actions:
# oci_database_database.the_database must be replaced
-/+ resource "oci_database_database" "the_database" {
. . .
~ database {
. . .
~ db_backup_config {
~ auto_backup_enabled = false -> true
+ auto_backup_window = (known after apply)
+ auto_full_backup_window = (known after apply)
+ backup_deletion_policy = (known after apply)
# (3 unchanged attributes hidden)
+ backup_destination_details { # forces replacement
+ dbrs_policy_id = (known after apply)
+ id = (known after apply)
+ type = "OBJECT_STORE" # forces replacement
}
}
# (1 unchanged block hidden)
}
Panic Output
Expected Behavior
Adding backup_destination_details to existing database should not trigger replacement. API docs show that this is updatable value.
Actual Behavior
Adding backup_destination_details to existing database that does not have backups enabled should update (not replace) the DB. Further note that direct API call does succeed i.e.:
After above direct API call the update succeeds. If, after I update via direct API call, I apply the second config above then it does not signal a replacement since the backup_destination_details is now set properly.
Steps to Reproduce
terraform apply the first config
Change to second config above then terraform apply
Community Note
Terraform Version and Provider Version
Affected Resource(s)
affected_resources = oci_database_database
Terraform Configuration Files
This first . . .
. . . then this change (adding backup details) . . .
Debug Output
Panic Output
Expected Behavior
Adding
backup_destination_details
to existing database should not trigger replacement. API docs show that this is updatable value.Actual Behavior
Adding
backup_destination_details
to existing database that does not have backups enabled should update (not replace) the DB. Further note that direct API call does succeed i.e.:After above direct API call the update succeeds. If, after I update via direct API call, I
apply
the second config above then it does not signal a replacement since thebackup_destination_details
is now set properly.Steps to Reproduce
terraform apply
the first configterraform apply
backup_destination_details
via API callterraform apply
the second and now it succeedsImportant Factoids