terraform-provider-oci icon indicating copy to clipboard operation
terraform-provider-oci copied to clipboard

Data guard association attempts destroy when adding additional NSG; should update

Open jeliker opened this issue 4 years ago • 7 comments

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 v0.12.21

  • provider.oci v3.78.0

Affected Resource(s)

affected_resources = oci_database_data_guard_association

Terraform Configuration Files

resource "oci_database_data_guard_association" "the_dataguard_association" {
  #Required
  creation_type                    = "NewDbSystem"
  database_admin_password          = var.admin_password
  database_id                      = var.database_id
  delete_standby_db_home_on_delete = true
  protection_mode                  = "MAXIMUM_PERFORMANCE"
  transport_type                   = "ASYNC"

  #Optional
  availability_domain              = var.availability_domain
  display_name                     = var.display_name
  hostname                         = var.hostname
  nsg_ids                          = [
    var.nsg1_id
  ]
  subnet_id                        = var.subnet_id
}
resource "oci_database_data_guard_association" "the_dataguard_association" {
  #Required
  creation_type                    = "NewDbSystem"
  database_admin_password          = var.admin_password
  database_id                      = var.database_id
  delete_standby_db_home_on_delete = true
  protection_mode                  = "MAXIMUM_PERFORMANCE"
  transport_type                   = "ASYNC"

  #Optional
  availability_domain              = var.availability_domain
  display_name                     = var.display_name
  hostname                         = var.hostname
  nsg_ids                          = [
    var.nsg1_id,
    var.nsg2_id
  ]
  subnet_id                        = var.subnet_id
}

Debug Output

Panic Output

Expected Behavior

I expect that changing the NSG list (or backup NSG list for Exadata) for an existing Data Guard Association would update the standby DB System that was launched (or used) for the Data Guard Association.

Actual Behavior

Changing the NSG list for an existing Data Guard Association does not update the standby DB System. Instead the Data Guard Association is flagged for destroy/create. Manual updates via OCI Console to the associated NSGs on standby DB System work as expected

Steps to Reproduce

  1. terraform apply using first script above (that has one NSG)
  2. Update script to have two NSGs
  3. terraform plan and note intention to destroy/create instead of update existing Data Guard Association

Important Factoids

  • Using VM DB System
  • Launching VM DB System as standby via Data Guard creation process (i.e. am not using existing DB System for standby)

References

jeliker avatar Jun 03 '20 19:06 jeliker