-
Notifications
You must be signed in to change notification settings - Fork 730
Description
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform Version and Provider Version
Terraform v1.13.4
on linux_amd64
- provider registry.terraform.io/hashicorp/time v0.13.1
- provider registry.terraform.io/oracle/oci v7.26.1
Affected Resource(s)
oci_database_autonomous_database
Terraform Configuration Files
resource "oci_database_autonomous_database" "primary" {
.......
database_management_status = "NOT_ENABLED"
....
}
(Optionally)
resource "oci_database_autonomous_database" "standby" {
.....
database_management_status = "NOT_ENABLED"
.....
}Debug Output
Panic Output
Expected Behavior
In general, after the very first terraform apply which deploys the resource, without changing anything and immediately re-run the same code with terraform apply command again, it should say "no change detected, infrastructure is up-to-date...."
Actual Behavior
When setting up a standalone, OR primary and remote standby cluster, if database_management_status set to "NOT_ENABLED", after the first terraform apply deployment successfully, immediately re-run terraform apply will got the following error
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
oci_database_autonomous_database.primary[0] will be updated in-place
~ resource "oci_database_autonomous_database" "primary" {
+ database_management_status = "NOT_ENABLED"
id = "ocid1.autonomousdatabase.oc1.ca-toronto-1.an2g6ljr5xeuumqaky6ebwpuvmiiki7pmmbpbmldtrajfyyv2irq3ngznxwa"
# (83 unchanged attributes hidden)
# (11 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
oci_database_autonomous_database.primary[0]: Modifying... [id=ocid1.autonomousdatabase.oc1.ca-toronto-1.an2g6ljr5xeuumqaky6ebwpuvmiiki7pmmbpbmldtrajfyyv2irq3ngznxwa]
╷
│ Error: 400-InvalidParameter, Operation failed. Cannot disable Database Management because it is not enabled.
│ Suggestion: Please update the parameter(s) in the Terraform config as per error message Operation failed. Cannot disable Database Management because it is not enabled.
│ Documentation: https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/database_autonomous_database
│ API Reference: https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/DisableAutonomousDatabaseManagement
│ Request Target: POST https://database.ca-toronto-1.oraclecloud.com/20160918/autonomousDatabases/ocid1.autonomousdatabase.oc1.ca-toronto-1.an2g6ljr5xeuumqaky6ebwpuvmiiki7pmmbpbmldtrajfyyv2irq3ngznxwa/actions/disableDatabaseManagement
│ Provider version: 7.26.1, released on 2025-11-13. This provider is 1 Update(s) behind to current.
│ Service: Database Autonomous
│ Operation Name: DisableAutonomousDatabaseManagement
│ OPC request ID: 480d35473a6e98bdbe10f6e1a5aca4a8/B6A9A28FE0EEA223EB56B5B4F14ADA26/3CC0D14798226081B8F47E9B678FE72D
│
│
│ with oci_database_autonomous_database.primary[0],
│ on 1908.tf line 34, in resource "oci_database_autonomous_database" "primary":
│ 34: resource "oci_database_autonomous_database" "primary" {
Steps to Reproduce
- create a standalone or primary/remote standby clueter with database_management_status = "NOT_ENABLED"
terraform apply(this will run successfully)- after initial deployment, re-run
terraform applyagain (this will result in error as shown above)