oracle / terraform-provider-oci

Terraform Oracle Cloud Infrastructure provider
https://www.terraform.io/docs/providers/oci/
Mozilla Public License 2.0
758 stars 674 forks source link

oci_database_cloud_vm_cluster prompts to update ssh_public_keys when no change exists #1679

Open jeliker opened 1 year ago

jeliker commented 1 year ago

Community Note

Terraform Version and Provider Version

Terraform v1.3.1
on darwin_amd64
+ provider registry.terraform.io/hashicorp/oci v4.96.0
+ provider registry.terraform.io/hashicorp/template v2.2.0

Affected Resource(s)

affected_resources = oci_database_cloud_vm_cluster

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. 
# Please remove any sensitive information from configuration files before sharing them. 

Debug Output

   # oci_database_cloud_vm_cluster.this will be updated in-place
  ~ resource "oci_database_cloud_vm_cluster" "this" {
        id                              = "ocid1.cloudvmcluster.oc1.iad.anuwwmqknoubjvacljsbnkfddiawswvgi4mal6aurwddrjpsfxytp4m6uxlq"
      ~ ssh_public_keys                 = [
            # (1 unchanged element hidden)
            "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDEbkTBR7+DOnq1h1axYHl+Nf4/pa9cbnX9JoTHTPperUP1kSqESvw6rJsC9BZ6jyxpxw5KVJVWIrwOdk5Z0ztONj0FFg8mLWmwbrmAofn0nTnpexBZHGKbqrhxSx7uZ32UQVt/TSmT6mzy5JIrG4JaJDhw2iO6e5RbodiV1UI8Q0r2BB+lH/aHDeo9ACnaDp4i4DE+NPSgRfaVvUu6WVD8XTZat4KKu9VwujTUhbCvjPW4Gcm5wbkAOSctj7F+OWoWU9xCU3qB/li7oAbEeo0ivBfw== key1",
          - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCor6cKI68PxRWmmXLv3OPqIh28jrAlZCAxI2hF/fDhANuFf0yKeOw/Dy9qdrNdWN6xjP8EcGdC/upmUYLgglCnAIwmjhdFbZ/F98ygFgS4PbNyXSjIvDSNfmeKMjoER518bLIA0SJMleX5UH0HdEVOaDrX2LFYEEPjnVHDZ/CiSSwZXm6marNSlim75SaQKXCXdvWvBwYkRdHwn7uE3c5x4sWpy4uAyBmcmNcOFy1w5b62w1qDvRyBf4SGm1e1z6a3yaWmTQTm5Klqm key2",
            "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAjKIkzpRQgVzHsrFd1H5TDKWuE0wRh0KX7inGnnRoDaZ5o3CW6rQMvgWA9zdNGBqIw6qtYknp+OFODQIZ8JuGxQ23vw4EPPH1CJtnLig14vvtNEG2qFyTC2w== key3",
            "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtrnznncQkFZefczIl9qbC/GkexWjtVJYiwpdZDgv7sxJjEnkt5PdrdUnYDOi8r3jt8ZlzTzuIZZ3JwzHmmLQCIBYTBEMLYbCp833LgWCtMY8EIYtygxbl2uDBCXW3OWg+XEmz4hkseDPZDeX0uv95pa6cmHZ4IKIBAigJ key4",
          + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCor6cKI68PxRWmmXLv3OPqIh28jrAlZCAxI2hF/fDhANuFf0yKeOw/Dy9qdrNdWN6xjP8EcGdC/upmUYLgglCnAIwmjhdFbZ/F98ygFgS4PbNyXSjIvDSNfmeKMjoER518bLIA0SJMleX5UH0HdEVOaDrX2LFYEEPjnVHDZ/CiSSwZXm6marNSlim75SaQKXCXdvWvBwYkRdHwn7uE3c5x4sWpy4uAyBmcmNcOFy1w5b62w1qDvRyBf4SGm1e1z6a3yaWmTQTm5Klqm key2",
        ]
        # (40 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

Panic Output

Expected Behavior

I expect a list of ssh_public_keys to not trigger an update unless the list changes

Actual Behavior

Update is triggered based on ssh_public_keys even though the list is unchanged

Steps to Reproduce

  1. terraform apply

Important Factoids

I have tried sorting the list and still the update is triggered.

I have removed the one key that is triggering an update, applied, then added it back, applied, then ran plan again and still says update required.

The one key triggering an update is 4096 big RSA. The others are 2048 and 4096 (some of each).

References

ravinitp commented 1 year ago

Thank you for reporting the issue. We observed the affected resources are not provided in the description or it's incorrect. We request you to add it in issue description as mentioned in below format. Example: affected_resources = oci_core_instance , oci_core_instances

If it's not related to any particular resource then mention affected resource as terraform. Example: affected_resources = terraform

As this works through automation, request you to follow exact syntax.

jeliker commented 1 year ago

I've updated the bug report per your guidance. When does the "awaiting-affected-resources" tag get removed?