Skip to content

oci_database_db_system display_name and db_home display_name change issue #2340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
luckeyca opened this issue Mar 27, 2025 · 1 comment
Open
Labels
bug In-Progress Terraform Team is working on the reproduce & fix

Comments

@luckeyca
Copy link

luckeyca commented Mar 27, 2025

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.9.3
on linux_amd64

  • provider registry.terraform.io/oracle/oci v6.31.0

Affected Resource(s)

oci_database_db_system

Terraform Configuration Files

resource "oci_database_db_system" "this" {

  compartment_id      = "ocid1.compartment.oc1..aaaaaaaaui5npqsoh4mqtvtwaj2"
  availability_domain = "ZoCL:CA-TORONTO-1-AD-1"
  display_name   = "test_db_system"

  shape          = "VM.Standard.E5.Flex"
  cpu_core_count = 4

  db_system_options {
    storage_management = "LVM"
  }
  storage_volume_performance_mode = "BALANCED"
  data_storage_size_in_gb         = 256
  disk_redundancy                 = "NORMAL"

  node_count       = 1
  source           = "NONE"
  database_edition = "ENTERPRISE_EDITION"

  ssh_public_keys = [
    "ssh-rsa  key",
  ]

  subnet_id  = "ocid1.subnet.oc1.ca-toronto-1.3eoojahlawb3p4kbeq"
  nsg_ids    = ["ocid1.networksecuritygroup.oc1.ca-toronto-1.5f6hxlqontxf45gcl5fuave4ifupzcq"]
  hostname   = "cltestdbs1"

  data_collection_options {
    is_diagnostics_events_enabled = true
    is_incident_logs_enabled      = true
  }

  time_zone = "UTC"

  freeform_tags = {"component"= "db system"}

  db_home {

   display_name = "test_db_home"
    db_version                  = "19.26.0.0"
    is_unified_auditing_enabled = false

    freeform_tags = {"component"= "db home"}

    database {
      # db_unique_name is in the wrong block in the doc example. should be under database block, not db_home block
      # sid_prefix argument listed in documentation and code example, but error out when defined under any block and cannot be found in source code
      # if don't set db_unique_name, no way to create connection string outputs due to lack of native connection string, db_unique_name and scan_ips
      # sid_prefix = lower(var.db_system_primary_cdb_name)
      db_unique_name = "cldb_yyz_001"
      db_name        = "clcdb01"
      pdb_name       = "clpdb01"

      admin_password      = "12QWas#-1"
      tde_wallet_password = "12QWas#-1"

      character_set  = "AL32UTF8"
      ncharacter_set = "AL16UTF16"

      freeform_tags = {"component"= "container db"}
    }
  }
}

Debug Output

Panic Output

Expected Behavior

since display_names are like descriptions, they should be allowed as empty or be changed to any text strings without having to change the underlying resources.

Actual Behavior

if change display_names to new values, it will destroy and rebuild the entire db system
if change existing display_name to empty string value, it will do nothing

Steps to Reproduce

  1. use the sample code above and fill in the real values
  2. terraform apply
  3. change display_name to empty string, terraform apply. it will do nothing
  4. change display_name to a new non-empty string, terraform apply will destroy and rebuild the entire db system

Important Factoids

References

@luckeyca luckeyca added the bug label Mar 27, 2025
@tf-oci-pub tf-oci-pub added the In-Progress Terraform Team is working on the reproduce & fix label Mar 27, 2025
@tf-oci-pub
Copy link
Member

Thank you for reporting the issue. We have raised an internal ticket to track this. Our service engineers will get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug In-Progress Terraform Team is working on the reproduce & fix
Projects
None yet
Development

No branches or pull requests

2 participants