Skip to content
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

Reapplying oci_database_vm_cluster_network resource without any change requires update-in-place #2201

Open
jlecerf62 opened this issue Sep 28, 2024 · 1 comment
Labels
bug In-Progress Terraform Team is working on the reproduce & fix

Comments

@jlecerf62
Copy link

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.6
on darwin_arm64

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

Affected Resource(s)

oci_database_vm_cluster_network

Terraform Configuration Files

resource "oci_database_vm_cluster_network" "test_vm_cluster_network" {
    compartment_id = "ocid1.compartment.oc1..aaaaaaaax6qmvwh5dsh2uyq2pzxxxxxxx"
    display_name = "test_vmcluster_network"
    exadata_infrastructure_id = "ocid1.exadatainfrastructure.oc1.eu-paris-1.anrwiljreen7geqau3e3f5nzuale7agxnzzmvwhhvwoxxxxxxx"
    scans {
        hostname = "testscan"
        ips = ["xxxx","xxxx","xxxx"]
    }
    vm_networks {
        #Required
        network_type = "CLIENT"
        nodes {
            #Required
            hostname = "node1"
            ip = "xxxxx"
            db_server_id = "ocid1.dbserver.oc1.eu-paris-1.anrwiljr6l7dliyabhpkb6blxxxxxxx"
            vip = "xxxxx"
            vip_hostname = "client"
        }
        domain_name = "test.com"
        vlan_id = xxx
        netmask = "255.255.255.192"
        gateway = "xxxxx"
    }
    vm_networks {
        network_type = "BACKUP"
        nodes {
            hostname = "node1-bck"
            ip = "xxxx"
            db_server_id = "ocid1.dbserver.oc1.eu-paris-1.anrwiljr6l7dliyabhpkb6bldsxxxxx"
            vip = "xxxx"
            vip_hostname = "backup"
        }
        domain_name = "test.com"
        vlan_id = 1
        netmask = "255.255.254.0"
        gateway = "xxxx"
    }
    validate_vm_cluster_network = false
    }

Debug Output

https://gist.github.com/jlecerf62/02b5203bcb9761605666e18c3e49a23a

Panic Output

Expected Behavior

There should be nothing to update since the TF code has not changed

Actual Behavior

erraform 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_vm_cluster_network.test_vm_cluster_network will be updated in-place
  ~ resource "oci_database_vm_cluster_network" "test_vm_cluster_network" {
        id                          = "ocid1.vmclusternetwork.oc1.eu-paris-1.anrwiljreen7geqalecd4j4dbc3ucq5oxxxxx"
        # (10 unchanged attributes hidden)

      - vm_networks {
          - domain_name  = "test.com" -> null
          - gateway      = "xxxxx" -> null
          - netmask      = "255.255.254.0" -> null
          - network_type = "BACKUP" -> null
          - vlan_id      = "1" -> null

          - nodes {
              - db_server_id = "ocid1.dbserver.oc1.eu-paris-1.anrwiljr6l7dliyabhpkb6bldseihip2gychuhxxxxx" -> null
              - hostname     = "node1-bck" -> null
              - ip           = "xxxxx" -> null
              - state        = "REQUIRES_VALIDATION" -> null
              - vip          = "xxxx" -> null
              - vip_hostname = "backup" -> null
            }
        }
      - vm_networks {
          - domain_name  = "test.com" -> null
          - gateway      = "xxxx" -> null
          - netmask      = "255.255.255.192" -> null
          - network_type = "CLIENT" -> null
          - vlan_id      = "534" -> null

          - nodes {
              - db_server_id = "ocid1.dbserver.oc1.eu-paris-1.anrwiljr6l7dliyabhpkb6bldseihip2gychuheinnxxxxx" -> null
              - hostname     = "node1" -> null
              - ip           = "xxxxx" -> null
              - state        = "REQUIRES_VALIDATION" -> null
              - vip          = "xxxx" -> null
              - vip_hostname = "client" -> null
            }
        }
      + vm_networks {
          + domain_name  = "test.com"
          + gateway      = "xxxx"
          + netmask      = "255.255.254.0"
          + network_type = "BACKUP"
          + vlan_id      = "1"

          + nodes {
              + db_server_id = "ocid1.dbserver.oc1.eu-paris-1.anrwiljr6l7dliyabhpkb6bldseihip2gychuheinnxxxxx"
              + hostname     = "node1-bck"
              + ip           = "xxxx"
              + state        = (known after apply)
              + vip          = "xxxxx"
              + vip_hostname = "backup"
            }
        }
      + vm_networks {
          + domain_name  = "test.com"
          + gateway      = "xxxxx"
          + netmask      = "255.255.255.192"
          + network_type = "CLIENT"
          + vlan_id      = "534"

          + nodes {
              + db_server_id = "ocid1.dbserver.oc1.eu-paris-1.anrwiljr6l7dliyabhpkb6bldseihip2gychuheixxxxx"
              + hostname     = "node1"
              + ip           = "xxxx"
              + state        = (known after apply)
              + vip          = "xxxx"
              + vip_hostname = "client"
            }
        }

        # (1 unchanged block hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.
```
### Steps to Reproduce

1. `terraform apply`

### Important Factoids



### References



@jlecerf62 jlecerf62 added the bug label Sep 28, 2024
@jlecerf62 jlecerf62 changed the title Reapplying oci_database_vm_cluster_network without any change requires update-in-place Reapplying oci_database_vm_cluster_network resource without any change requires update-in-place Sep 28, 2024
@tf-oci-pub tf-oci-pub added the In-Progress Terraform Team is working on the reproduce & fix label Sep 28, 2024
@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